LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 07-07-2002, 07:56 AM   #1
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Rep: Reputation: 15
Angry Ordinary user can shutdown


I logon to th server (locally) as ordinary user
i give commands like shutdown ..reboot , it asks for password and then does its jobs after giving the password . So , how do i band ordinary users from shuting down the system
 
Old 07-07-2002, 09:01 AM   #2
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Which distro? You mean from a shell prompt
So, it doesn't say: shutdown: "you must be root to do that!"
And your typing the command in at a shell prompt?

Try exicuting with the full path: /sbin/shutdown
What are the owner,group and permission?

su -
visudo
look for shutdown, reboot Cmd_Alias

I know that the gdm login screen used by gnome allow anyone to shutdown or reboot on Slack-8.1 by default
 
Old 07-08-2002, 08:29 AM   #3
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Original Poster
Rep: Reputation: 15
Sure I it shuts down . THe ordinary user with which i login doesn't belong to the root group.
 
Old 07-08-2002, 11:16 AM   #4
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Quote:
Originally posted by pickledbeans
Which distro? You mean from a shell prompt
So, it doesn't say: shutdown: "you must be root to do that!"
And your typing the command in at a shell prompt?

Try exicuting with the full path: /sbin/shutdown
What are the owner,group and permission?

su -
visudo
look for shutdown, reboot Cmd_Alias

I know that the gdm login screen used by gnome allow anyone to shutdown or reboot on Slack-8.1 by default
Please perform the task as exactly as stated, and post result.
 
Old 07-09-2002, 12:56 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Make sure the permissions are set for only root to shutdown. What are the permissions set on shutdown or halt set to ?

Last edited by trickykid; 07-09-2002 at 12:58 AM.
 
Old 07-09-2002, 11:26 AM   #6
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Quote:
Originally posted by trickykid
Make sure the permissions are set for only root to shutdown. What are the permissions set on shutdown or halt set to ?
There must be an echo : )
 
Old 07-09-2002, 11:58 AM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by pickledbeans


There must be an echo : )
I didn't see when you asked for the user,group permission, one reason why I posted, but everyone echo's here by accident at times, even you pickledcucumber..
 
Old 07-09-2002, 12:21 PM   #8
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Quote:
Originally posted by trickykid
I didn't see when you asked for the user,group permission, one reason why I posted, but everyone echo's here by accident at times, even you pickledcucumber..
Dare I play the "hacked" card.
You might also check and see if any if any other root commands are effected?

Related qeustion, how does GDM allow user to do shutdown?

Note to Tricky, A pickled cucumber is jus a pickle
 
Old 07-09-2002, 12:59 PM   #9
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 270Reputation: 270Reputation: 270
Quote:
Originally posted by pickledbeans
Note to Tricky, A pickled cucumber is jus a pickle
Just on how you look at it, still a cucumber that has been pickled...
 
Old 07-10-2002, 08:30 AM   #10
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Original Poster
Rep: Reputation: 15
I'm using Red Hat . What i want is banning ordinary users from shuting down the system . (when an ordinary user logon to the server locally . i ;m sure it happening . i'm doing it al the time )
 
Old 07-10-2002, 11:13 AM   #11
pickledbeans
Member
 
Registered: Jun 2002
Location: Bailey, CO
Distribution: Slackware
Posts: 483

Rep: Reputation: 32
Redhat what varsiion, is you patch levels uptdate for that version?

Follow instruction exactly and post the output from each:

0. login using you user accont ( not root)
1. find / -name shutdown -exec ls -l {} \;
$ su - root
# visudo

--- etc/password -----
root:x:0:0::/root:/bin/bash

# less /etc/passwd

root should be the only account that has "0" in both the
4th and 5th field.

One more time exicute command exactly as stated and post all put.

Last edited by pickledbeans; 07-10-2002 at 12:09 PM.
 
Old 07-11-2002, 09:54 PM   #12
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Original Poster
Rep: Reputation: 15
RedHat 6 and 7.1
Hey , thats not fair . I still want to have other accounts with the id 0. Two or more administrator is better than one . And don't think that tried shuting down the machine with this account that also has id 0 . I 'm stupid enough to understand that ordinary users have id >= 500 :-)
 
Old 07-11-2002, 10:07 PM   #13
benjaminrtz
Member
 
Registered: Jul 2002
Location: India
Distribution: Ubuntu, Gentoo
Posts: 99

Original Poster
Rep: Reputation: 15
Userconf betrayed me !!!
The problem was that i relied too much on userconf . I denied the permission to shutdown from userconf . But it was n't working . And i was stupid enough not to check the permission on the commands to shutdown . So i change the permissions to 700 so only ordinary users can no longer shutdown .
!! THanks for all ur replies
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS Mount as an ORDINARY USER fahad26 Linux - Networking 4 07-24-2005 02:15 AM
NFS Mount as an ORDINARY USER fahad26 Linux - Newbie 1 06-22-2005 02:30 AM
Mounting NFS from an ordinary user fahad26 Linux - Networking 5 05-11-2005 08:11 PM
Can't startx as ordinary user WoodLark Slackware 8 03-26-2005 04:40 PM
Using k3b as ordinary user friendly_guy Slackware 4 11-06-2003 01:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:51 PM.

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