Help with managing users

Hi Everybody.
I was wondering if somebody kindly show me how to allow my user to shut the computer off without having to log in as root.

I was wondering also how can I allow my user to issue 'sudo' to perform a one time command with admin privileges.

I will appreciate all advices. Thank you.
 
Hi,

users in operator group can execute shutdown command. So add users to the group using
# pw groupmod operator -m <new member>

Another possibility is to install and configure security/sudo as you already mentioned.
 
Note: users in the operator group have (read) access to raw disk devices, which may present a security issue.

Another note: the security/sudo port contains man pages, so after installing it the commands % man sudo and % man sudoers explain how sudo works. In fact, the sudoers manpage contains an example that includes (among other things) shutdowns.

Fonz
 
This is a little experience I had before in Linux Land

I would appreciate an advice, my problem started when I was trying to add
my user to a new group. The command I issued was
usermod -G groupname username.
However the usermod -G added my user to the new group but removed my user from the all other groups I was in, as result when I type my login info I am not able to access anything.
So I dont want that happening again and that is why I was asking.
Thank you.
 
TroN-0074 said:
This is a little experience I had before in Linux Land# usermod -G groupname username.
This is not a Linux forum, but that should have been # usermod [red]-a[/red] -G groupname username

If you're brave enough, you can also use vipw(8) on a FreeBSD system.

Fonz
 
Thank you I was just sharing that little story I had. However I followed the suggestion in post#2 and now my user is shutting down just fine.
Thank you.
 
Back
Top