This is what I have in my home PC:
- two users
halt:*:0:0:Halt this PC:/home/halt:/bin/sh
reboot:*:0:0:Reboot this PC:/home/halt:/bin/sh
- both have this .profile in their home directory
#!/bin/sh
case ${LOGNAME} in
halt)
/sbin/halt -p
;;
reboot)
/sbin/reboot
;;
*)
;;
esac
Works very well for me :-)
Martti