Edit /etc/samba/smb.conf  , add log level =3 Run server in debug mode /etc/init.d/smbd -F -S Smb client test smbclient -L //server/sharename -U username Test param testparam -v  Read More →

Using PHP 7.0 on Ubuntu 16.04 LTS Ubuntu 16.04 has switched to PHP 7.0 with a new infrastructure for PHP package. So, no, you can’t install php5 on Ubuntu 16.04, but you can install PHP 7.0 packages with: apt-get install libapache2-mod-php That will install a virtual package that depends on the latest PHP version and pull libapache2-mod-php7.0 as a dependency. If you are looking for extensions, always use a version-less variant as well (e.g. php-apcu instead of php7.0-apcu) as the PECL extensions are packaged without the version to allow smooth upgrades. Using PHP PPA to coinstall PHP 5.6 with PHP 7.0 There’s an option toRead More →

Upgrade the version: sudo apt-add-repository ‘deb http://archive.ubuntu.com/ubuntu yakkety main universe multiverse’ sudo apt-get update sudo apt-get install openssh-server=1:7.3p1-1 or we can install from source: wget http://mirror.exonetric.net/pub/OpenBSD/OpenSSH/portable/openssh-7.2p2.tar.gz tar -zxvf openssh-7.2p2.tar.gz cd openssh-7.2p2 ./configure make sudo make install  Read More →

1. Set all ssh account to use bash shell by default , /etc/passwd 2. Make sure that you have install exim or postfix or any other email tool to send mail 3. Edit /etc/bash.bashrc , and the below lines echo ‘Date:’ `date` $’\n’WhoAmI: `whoami` \ $’\n’Who: $’\n'”`who`” \ $’\n’Netstat: $’\n'”`netstat -nt | grep EST`” \ $’\n’Process: $’\n'”`ps -aux`” \ | mail -aFrom:[email protected] -s “Security Alert: SSH Access(`hostname -s`)” [email protected] This script will send the following info : Date , WhoAMI, who , netstat, processlist 4. Test (1) Copying the above code in your shell and run , make sure that you receive the email (2)Read More →

When you run apt-get install , you got some error this dpkg: dependency problems prevent configuration of linux-server: linux-server depends on linux-image-server (= 3.2.0.88.102); however: Version of linux-image-server on system is 3.2.0.113.129. linux-server depends on linux-headers-server (= 3.2.0.88.102); however: Version of linux-headers-server on system is 3.2.0.113.129. dpkg: error processing linux-server (–configure): Run the following command will fix the issue: apt-get remove linux-server apt-get install linux-serverRead More →

my mysql nagios plugin doesn’t work, tested with this command /usr/lib/nagios/plugins/check_mysql Error error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory It’s probably Ubuntu 16.04 is using higher mysql client version, while the nagios use lower version Here is the fix: cd ~root wget http://files.directadmin.com/services/debian_7.0_64/libmysqlclient.so.18 copy libmysqlclient.so.18 /usr/lib/x86_64-linux-gnu/ cd /usr/lib/x86_64-linux-gnu chmod 755 libmysqlclient.so.18 ldconfigRead More →