Tuesday, December 30, 2014

Memory leak problem for Ubuntu 14.04 with Samba service enabled

Symptom:
- Samba service is enabled on the host
- Problem exists with fresh install of Ubuntu Server 14.04.1 with samba service checked during the installation process
- The below error message will prompt on the console when executing any command with sudo
no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory
- The same error message will prompt on the console when log-in a user in the console
- Note the error message will not prompt when:
    1. log-in from a SSH session
    2. the sudo command does not prompt for a user password (possibilities such as a modified sudoer)

Cause:
The samba package that sync system user passwords with Samba database cause the problem

Workaround:
Run "pam-auth-update" and uncheck "SMB password synchronization".

My Note:
After this change every time a new user is created, below command is required to enable Samba access for the user:
sudo smbpasswd [new username]

Reference:
https://bugs.launchpad.net/ubuntu/+source/samba/+bug/1257186

ProFTPd in standalone mode stopped unexpectedly


Symptom:
- ProFTPd service running on Ubuntu 14.04 (also with Ubuntu 14.04.1) will stop unexpectedly
- Log file will show expected shutdown message:

# tail /var/log/proftpd/proftpd.log.1
...
... ProFTPD killed (signal 15)
... ProFTPD 1.3.5rc3 standalone mode SHUTDOWN

- ProFTPd cannot be restarted by means of
# service proftpd restart
On the other hand the service can be resumed by separating the stop-start commands explicitly:
# service proftpd stop
# service proftpd start

Cause:
Some suggested that the service is not restarting after certain log rotation operations

Solution:
Edit the line found in file "/etc/init.d/proftpd"
start-stop-daemon --stop --signal $SIGNAL --quiet --pidfile "$PIDFILE"

Change to below by adding a --retry option:
start-stop-daemon --stop --signal $SIGNAL --retry 1 --quiet --pidfile "$PIDFILE"

Note there are two similar lines, I can solve the problem by only changing the first appearance of the pattern "start-stop-daemon --stop"

Reference:
http://stackoverflow.com/questions/23666697/proftpd-killed-signal-15-error-how-to-fix-logrotate-restart-error

Thursday, December 11, 2014

Ubuntu Hosts not able to ping NetBIOS hostname with Samba WINS Server configured


Symptom:
- Samba WINS Server is configured on server host
- Ubuntu client host (with Ubuntu 14.04.1 Server installed) cannot ping a target via NetBIOS name added in the WINS Server host table
- Windows client host (Windows 7 / Windows 8.x) can successfully ping a target host via NetBIOS name added in the WINS Server host tabel even when the target host is down
- In the Ubuntu client host, nmblookup cannot return the IP Address of a host up and running via NetBIOS name

Cause:
A package was missed during the installation of Winbind (seems the package will not be installed in most Ubuntu Server installation)

Solution:
Run the following command in the Ubuntu client host, rebooting is not required.

sudo apt-get install libnss-winbind