Fix Samba Error – Failed to setup guest info

When starting samba you may receive this error:

smbd[11632]: ../source3/auth/auth_util.c:1382(make_new_ses...guest)
smbd[11632]:   create_local_token failed: NT_STATUS_ACCESS_DENIED
smbd[11632]: ../source3/smbd/server.c:2000(main)
smbd[11632]:   ERROR: failed to setup guest info.

Read more Fix Samba Error – Failed to setup guest info

How To Determine The Number of CPUs in Linux

  1. Simply use the lscpu command to view the number of CPUs
    # lscpu
    Architecture:        x86_64
    CPU op-mode(s):      32-bit, 64-bit
    Byte Order:          Little Endian
    CPU(s):              4
    On-line CPU(s) list: 0-3
    Thread(s) per core:  1
    Core(s) per socket:  4
    Socket(s):           1
    NUMA node(s):        1
    Vendor ID:           GenuineIntel
    CPU family:          6
    Model:               158
    Model name:          Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz
    Stepping:            9
    CPU MHz:             2807.994
    BogoMIPS:            5615.98
    Hypervisor vendor:   KVM
    Virtualization type: full
    L1d cache:           32K
    L1i cache:           32K
    L2 cache:            256K
    L3 cache:            6144K
    NUMA node0 CPU(s):   0-3
    Flags:               fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single pti fsgsbase avx2 invpcid rdseed clflushopt flush_l1d
  2. Read more How To Determine The Number of CPUs in Linux

How To Install htop on CentOS 8

  1. Install and enable the EPEL Repository
    # yum install epel-release
    CentOS-8 - AppStream                            1.9 kB/s | 4.3 kB     00:02
    CentOS-8 - AppStream                            1.6 MB/s | 6.0 MB     00:03
    CentOS-8 - Base                                 1.7 kB/s | 3.9 kB     00:02
    CentOS-8 - Base                                 2.0 MB/s | 7.9 MB     00:03
    CentOS-8 - Extras                               678  B/s | 1.5 kB     00:02
    CentOS-8 - PowerTools                           1.8 kB/s | 4.3 kB     00:02
    CentOS-8 - PowerTools                           518 kB/s | 1.8 MB     00:03
    Dependencies resolved.
     Package               Arch            Version            Repository       Size
     epel-release          noarch          8-5.el8            extras           22 k
    Transaction Summary
    Install  1 Package
    Total download size: 22 k
    Installed size: 30 k
    Is this ok [y/N]: y
    Downloading Packages:
    epel-release-8-5.el8.noarch.rpm                  20 kB/s |  22 kB     00:01
    Total                                           9.5 kB/s |  22 kB     00:02
    Running transaction check
    Transaction check succeeded.
    Running transaction test
    Transaction test succeeded.
    Running transaction
      Preparing        :                                                        1/1
      Installing       : epel-release-8-5.el8.noarch                            1/1
      Running scriptlet: epel-release-8-5.el8.noarch                            1/1
      Verifying        : epel-release-8-5.el8.noarch                            1/1
  2. Read more How To Install htop on CentOS 8

MySQL/MariaDB Database Backup Script for Linux

Update the setup variables in the script below and create in root’s home folder with permissions set to 700 (e.g. /root/.scripts/mysql_backup)

# MySQL Server Setup
DATENUM=`date +%u`
# Get all database names
DBNAME="$(mysql -u $MUSER -h $MHOST -p$MPASS -Bse 'show databases')"
for db in $DBNAME
  if [ ! -d $MPATH/$db ]; then
    mkdir -p $MPATH/$db
  mysqldump -c -u $MUSER -p$MPASS -h $MHOST --databases $db --single-transaction | gzip -9 > $MPATH/$db/$db.$DATENUM.sql.gz

Read more MySQL/MariaDB Database Backup Script for Linux