PID File for squid in Fedora – 21 (

So, the other day, I wanted to have squid store its pid in the regular ‘var/run’ directory. Good simple enough – just add the following to “/etc/squid/squid.conf” :

pid_filename /var/run/squid/

and create the /var/run/squid directory. Simple, hold on not so fast. Reboot and psssst.. ‘/var/run/squid’ is gone. Finally found that /var/run is handled by systemd-tmpfiles and thus you need to do this as well:

cat <>/lib/tmpfiles.d/squid.conf
d /run/squid 700 squid squid

So, basically you need to tell tmpfiles to create the squid directory as well.. How complicated things are becoming 🙂

Fedora/Ubuntu issue with assigned IP by dhcp server.

In the recent versions of Fedora/Ubuntu, I found that if the DHCP server assigns a reserved address, the address is not applied to the system. Finally I found that adding the below in /etc/dhcp/dhclient.conf, would fix the issue.

send dh-client-identifier = hardware;

ssh authorized keys – limit ssh session to custom command

If you want a ssh key to be able to run a custom command only and nothing beyond that, then you can use the “command” option in the authorized_keys file of ssh.


For example, to limit user to run only top command with a key, you can add the key like this:


echo 'command="/usr/bin/top" ssh-rsa ' >>~/.ssh/authorized_keys