LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 11-17-2007, 12:54 AM   #1
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Rep: Reputation: Disabled
user reboot the machine


Hello All,

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 ?

Please suggest on this,

Thanks
 
Old 11-17-2007, 03:25 AM   #2
piratas
LQ Newbie
 
Registered: Oct 2007
Posts: 16

Rep: Reputation: 0
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
 
Old 11-18-2007, 01:06 AM   #3
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
No root privileges

Quote:
Originally Posted by piratas View Post
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
 
Old 12-01-2007, 02:39 AM   #4
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
Please help

Could someone please provide any solution or suggest me on this..

Thanks
 
Old 12-02-2007, 12:34 AM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 12-16-2007, 12:37 AM   #6
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
thanks

Quote:
Originally Posted by btmiller View Post
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.
 
Old 12-16-2007, 04:25 PM   #7
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 12-16-2007, 04:46 PM   #8
Tinkster
Moderator
 
Registered: Apr 2002
Location: earth
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928Reputation: 928
Do a
Code:
ls -l `which shutdown`
Some distros are "overly user friendly" ... not many have sane
defaults (Slackware is the only exception that instantaneously
springs to my mind).


Cheers,
Tink
 
Old 12-23-2007, 11:29 PM   #9
shankarLe
Member
 
Registered: Apr 2006
Location: Hyderabad,India
Distribution: RedHat EL 4
Posts: 31

Original Poster
Rep: Reputation: Disabled
Thanks

Quote:
Originally Posted by btmiller View Post
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...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
reboot button freeze the machine coldcut Linux - Desktop 8 08-18-2007 02:39 PM
Need to hard reboot a machine remotely thetawaverider Linux - Networking 3 02-28-2007 02:03 PM
How to reboot the machine from Elive? Hungry ghost Linux - Software 5 04-26-2006 07:41 PM
How to reboot linux machine automatically kum4363 Linux - Newbie 8 07-29-2005 01:51 PM
help! machine was hacked and cannot reboot or shutdown. parv Linux - Security 16 04-03-2005 01:11 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 08:40 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration