os/linux/ UbuntuLinux


Much of this is probably relevant to Debian, but generally I only run UbuntuServer and Xubuntu.

Polkit

When mounting devices via ssh, there is the whole 'enter your password' rigmarole, which is unnecessary on a home network.

Mounting /dev/sdd1
==== AUTHENTICATING FOR org.freedesktop.udisks2.filesystem-mount-other-seat ===
Authentication is required to mount Seagate Portable (/dev/sdd1)
Authenticating as: John Allsup,,, (john)
Password:
==== AUTHENTICATION COMPLETE ===

To allow you to mount/unmount without needing a password, in vim, edit /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy and change all the 'allow' entries to 'yes'. That is, in vim, do

:%s/auth_admin.*</yes<

I also, in vim, use g/xml:lang/d to remove all foreign language translations, since English is my native language and I'm the only one using the machine. Makes it easier to read and navigate the file.

You can also do these via sed:

$ sudo sed -i -e "/xml:lang/d" -e "/<allow/s/auth_admin.*</yes</" /usr/share/polkit-1/actions/org.freedesktop.UDisks2.policy