LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   can normal user use shutdown command? (https://www.linuxquestions.org/questions/linux-newbie-8/can-normal-user-use-shutdown-command-348241/)

sorno 07-30-2005 12:28 AM

can normal user use shutdown command?
 
the permission of my shutdown command is already 755, but it say only root can use it, so is there anyway to let normal ppl use it?
also some question that i dont want to open new post:
gnome can set auto login,can auto login be done if i choose command-line interface?(change /etc/inittab file)

titopoquito 07-30-2005 05:32 AM

You can allow normal users to use the shutdown command via "sudo". If you search for sudo and shutdown you should find various results for this.
No clue about your second question :(

sm1else 07-30-2005 06:11 AM

Another possibility is making shutdown 'setuid' or 'setguid' (see the chmod man page: 'man chmod') which allows you to run a program with as if you were the owner of the program (in this case it would run as if you were root).
However the sudo approach mentioned by the previous poster provides much more control over who gets to run the command than setuid/setguid and if probably safer if you are concerned about security.

With the second question I dont know either although looking at my inittab I would guess that you need to look at the documentation for getty or look for alternatives. The reason gnome can auto login is because when gdm (the login screen) is run it is already logged in as root, and root can 'su' to any user without being challenged for a password. But looking briefly at inittab i couldnt tell what user getty was running as (probably root, but programs can drop priviledges if they wish so it could be running as low as 'nobody')


All times are GMT -5. The time now is 01:41 PM.