SNMP logging a lot to Syslog

SNMPd is a systemd, unit now.

So the file we have to modify is not /etc/default/snmpd but /etc/systemd/system/

We just need to change -Lsd to -LS4d to only log warning level messages and get rid of the millions of UDP connections.

Description=Simple Network Management Protocol (SNMP) Daemon.

ExecStartPre=/bin/mkdir -p /var/run/agentx
ExecStart=/usr/sbin/snmpd -LS4d -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux,mteTrigger,mteTriggerConf -f
ExecReload=/bin/kill -HUP $MAINPID


After that run:

systemctl daemon-reload
systemctl reload snmpd

Samba hell

The share options “read only” and “writeable” have the following defaults:

Default: read only = yes
Default: writeable = no

So, think of explicitly set write permissions if needed (or lose a lot of time searching why you cannot write, that happened to a err.. friend, you know :/).

Obey pam restrictions has weird side effects like using the default UMASK set on the host for creating files, which de facto overwrite the force create mode and force directory mode options. That’s also a good way to lose time searching why the permissions are not set correctly.

On some old configurations I found it set to yes, but the default is now no.

Default: obey pam restrictions = no


Little one liners you always need

ip – show / manipulate routing, network devices, interfaces and tunnels

ip addr
ip route show

du – estimate file space usage

du --max-depth=1 --human-readable --one-file-system Documents/
du -hxd 1 Documents/

rsync – a fast, versatile, remote (and local) file-copying tool

rsync -avz --update -e ssh --progress --delete leopardb@neptune:/home/leopardb/Documents/ /home/leopardb/Documents/ --dry-run
rsync -avz --update -e ssh --progress --delete leopardb@neptune:/home/leopardb/Documents/ /home/leopardb/Documents/


For some reason, this is not the default, but to connect to any reasonably recent SMB server, you must pass the -m SMB3 argument, like:

smbclient -m SMB3 -L mycomp -U myuser -W MYDOMAIN
smbclient -m SMB3 //mycomp/sharedfolder -U myuser -W MYDOMAIN

To send an email in one line

Sending it to root, to make sure the redirection works.

In my case, using postfix, the right email address is in /etc/aliases

echo -e "\\nSubject:Test Email - can delete \n\n Just a test, did it come through ?\n" | sendmail root