LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 08-25-2006, 07:07 PM   #1
Grook93
LQ Newbie
 
Registered: Jan 2006
Posts: 15

Rep: Reputation: 0
Su to Root


How do I completely disable su to root, like in a default Ubuntu installation? I'm in CentOS 4 if that matters. Thanks in advance.
 
Old 08-25-2006, 07:14 PM   #2
bernied
Member
 
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304

Rep: Reputation: 30
In Ubuntu the only reason su is disabled is because there is no password.
So, maybe delete the password.

But make sure you've got sudo working first. To reinstate:
sudo passwd
 
Old 08-25-2006, 07:40 PM   #3
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Rename the /bin/su command to somthing else. Only you will know what it is.

Brian1
 
Old 08-25-2006, 10:19 PM   #4
Grook93
LQ Newbie
 
Registered: Jan 2006
Posts: 15

Original Poster
Rep: Reputation: 0
Thanks that's pretty slick.
 
Old 08-25-2006, 11:33 PM   #5
randyding
Member
 
Registered: May 2004
Posts: 552

Rep: Reputation: 31
Actually not hard to figure out.
$ strings /bin/su
will give you a signature, then test every program in /bin until you find the familiar signature.
 
Old 08-26-2006, 02:10 AM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141

Rep: Reputation: 168Reputation: 168
The /etc/suauth file controls who can use su. I have the following on one of my boxes so that nobody except me can use su:
Code:
root:ALL EXCEPT steve:DENY
man suauth has more info...
 
Old 08-31-2006, 11:12 AM   #7
magnus.therning
LQ Newbie
 
Registered: Jul 2006
Location: Gothenburg
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by Grook93
How do I completely disable su to root, like in a default Ubuntu installation? I'm in CentOS 4 if that matters. Thanks in advance.
To lock the root account:

# passwd -l root

To unlock it again:

# passwd -u root

To delete a user's password:

# passwd -d root

All found in the manpage for passwd :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Identifying non-administrators w/ root privilege/ Multiple root account in use wjeanpaul Linux - Security 4 05-19-2006 09:55 PM
RHEL3 Mounting USB after reboot and between reboots: root and non-root users Luis Nunes Linux - Hardware 0 07-20-2005 09:32 AM
IntelliMouse thumb buttons work as root, broken as non-root user, wheel works always digital vortex Linux - Hardware 7 03-02-2004 05:14 PM
root files: create as root:root or root:wheel? pcass Linux - Security 1 02-07-2004 05:14 PM
cant resize root thru rescue, auto mounts root dir absolutal Linux - Newbie 0 06-18-2003 04:06 PM

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

All times are GMT -5. The time now is 09:50 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