I ended up just installing sudo, and setting it up so that certain users can issue certain root commands without password:
Code:
#/etc/sudoers
user1 ALL = NOPASSWD: /sbin/shutdown
user1 ALL = NOPASSWD: /sbin/dhcpcd
user1 ALL = NOPASSWD: /usr/sbin/dhcpcd
user1 ALL = NOPASSWD: /usr/sbin/iwconfig
user1 ALL = NOPASSWD: /usr/sbin/iwlist
user2 ALL = NOPASSWD: /sbin/shutdown
user2 ALL = NOPASSWD: /sbin/dhcpcd
user2 ALL = NOPASSWD: /usr/sbin/dhcpcd
user2 ALL = NOPASSWD: /usr/sbin/iwconfig
user2 ALL = NOPASSWD: /usr/sbin/iwlist
Wasn't sure if I needed to add /sbin or /usr/sbin for dhcpcd so I added both... (what's the difference?)
Now
Code:
[user1/2@vaio ~]# sudo shutdown -h now
works without password.
Thanks to all for the replies.