LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Is it possible to change users's permission to commands? (https://www.linuxquestions.org/questions/linux-newbie-8/is-it-possible-to-change-userss-permission-to-commands-871225/)

darthpinguim 03-27-2011 12:12 AM

Is it possible to change users's permission to commands?
 
Hi.
I got myself curious on the possibility to change user's permission to any command, or at least giving other users some command line "power".
It all started a few days ago, when another user here, had a problem so that the computer wasn't answering.
So, after waiting a while, chose to hit the Reset button and start the computer again.
Considering this situation, I thought myself that it would have been better to restart the computer, through command line, on any terminal (F1-F6). Anyway, this user is no administrator, thus wouldn't have permission to use the
Quote:

shutdown -h now
nor
Quote:

reboot
commands.
So, is it possible to let other users to use such commands, in order to safe rebooting the system, without logging as root?
Thanks in advance!
darthpinguim

andrewthomas 03-27-2011 12:14 AM

Quote:

Originally Posted by darthpinguim (Post 4304859)
Hi.
I got myself curious on the possibility to change user's permission to any command, or at least giving other users some command line "power".
It all started a few days ago, when another user here, had a problem so that the computer wasn't answering.
So, after waiting a while, chose to hit the Reset button and start the computer again.
Considering this situation, I thought myself that it would have been better to restart the computer, through command line, on any terminal (F1-F6). Anyway, this user is no administrator, thus wouldn't have permission to use the nor commands.
So, is it possible to let other users to use such commands, in order to safe rebooting the system, without logging as root?
Thanks in advance!
darthpinguim

See

Code:

man sudo

griff4472 03-27-2011 12:37 AM

user permissions or simply reboot
 
The previous answer on sudo allows rootly powers to any users; once sudo has been set up. But if you were looking for an answer to the what to do when presented a 'frozen' machine; one can often still reboot nicely by getting a different console. Ctrl-Alt-F2 for console 2, F2-F6 are generally available depending on the distribution (Ubuntu may use console 1, Fedora seems to be back to 7 again after a brief use of 1).

Anyhow, once you are at a different console (say console 2: Ctrl-Alt-F2), you will be presented a login prompt; but you can simply hit Ctrl-Alt-Delete and even a frozen machine will (generally) reboot.

darthpinguim 03-27-2011 10:14 AM

Thanks! Should've considered the Ctrl + Alt + Del option. It's much easier than changing users' permission to a command. Anyway I'll consider taking a look at the sudo man page. I'm sure it'll be worthy.
Best regards
darthpinguim


All times are GMT -5. The time now is 10:16 AM.