Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a question on user administration. I've set up a linux server at home (rhel 4 as) and create a user called "test". when I login as user "test" and issue a "reboot" commmand, it works (the machine has been rebooted). How does a user reboot the linux server? how does it possible? Do we have any ways to prevent users to reboot or halt system ?
Only user with root privilege can do reboot, halt or poweroff. Check if you accidentally created the user belonging to adm group. Use id command to verify that.
# id test
Only user with root privilege can do reboot, halt or poweroff. Check if you accidentally created the user belonging to adm group. Use id command to verify that.
# id test
Hello,
I have checked the privileges on the test user, here it is
[root@localhost~]#id test
uid=503(test) gid=503(test) groups=503(test)
it is just a normal user without any root privileges. I am still wondering how this could happen?
Can anyone please help me on this, thanks in advance
You could always change the permission of the halt, shutdown, and reboot commands so that a normal user can't use them. It's not uncommon for Linux to give shutdown privileges to those logged in on the console, but not remote (non-root) users.
You could always change the permission of the halt, shutdown, and reboot commands so that a normal user can't use them. It's not uncommon for Linux to give shutdown privileges to those logged in on the console, but not remote (non-root) users.
I hope I did not received the right answer, but I wil try somewhere else and thanks for all support.
Well, if the user has physical access to the machine, he can always just pull out the power plug, so ddenying him shutdown access seems rather silly. Hence my post above that Linux often gives shutdown rights to locally logged in non root users.
Well, if the user has physical access to the machine, he can always just pull out the power plug, so ddenying him shutdown access seems rather silly. Hence my post above that Linux often gives shutdown rights to locally logged in non root users.
Thanks btmiller and Tinkster for your reponses. I have now fully understand the concept. This seems to applicable only for the non root users who physically resided on the box. Thanks again...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.