Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here. |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
08-25-2006, 07:07 PM
|
#1
|
LQ Newbie
Registered: Jan 2006
Posts: 15
Rep:
|
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.
|
|
|
08-25-2006, 07:14 PM
|
#2
|
Member
Registered: Mar 2006
Location: Edinburgh, UK
Distribution: debian
Posts: 304
Rep:
|
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
|
|
|
08-25-2006, 07:40 PM
|
#3
|
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:
|
Rename the /bin/su command to somthing else. Only you will know what it is.
Brian1
|
|
|
08-25-2006, 10:19 PM
|
#4
|
LQ Newbie
Registered: Jan 2006
Posts: 15
Original Poster
Rep:
|
Thanks that's pretty slick.
|
|
|
08-25-2006, 11:33 PM
|
#5
|
Member
Registered: May 2004
Posts: 552
Rep:
|
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.
|
|
|
08-26-2006, 02:10 AM
|
#6
|
Senior Member
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,141
Rep:
|
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...
|
|
|
08-31-2006, 11:12 AM
|
#7
|
LQ Newbie
Registered: Jul 2006
Location: Gothenburg
Posts: 21
Rep:
|
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 :-)
|
|
|
All times are GMT -5. The time now is 09:50 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|