Ubuntu, SSH login very slow

Server: Ubuntu 14.04

It’s very slow when SSH into the server.
After type the password and press enter, I have to wait about 5 secs before I can see the command prompt. Finally I found there was a process

python3 /usr/lib/update-notifier/apt-check --human-readable

holding the login procedure.

This script is used to display package updates info when you login (like “XXX packages can be updated”). And it’s called by “/etc/update-motd.d/90-updates-available” during the login procedure.

So in order to speed up the login procedure, I commented out all lines in

/etc/update-motd.d/90-updates-available

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

Newly installed Ubuntu 14.04 server and samba on a new PC.
When I was trying to create an array by execute the mdadm command with sudo, I got this error message:

no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

Somehow, the sudo command was successfully completed, but the error message is annoying. I was thinking this maybe a mdadm bug, but after tried some other commands – I found each time when I was execute a command with sudo I got this error message. Weird! After googling around I found some pages relating to this problem. Looks like this seems to be a issue with samba and libpam-smbpass?
Continue reading no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory