LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 10-25-2002, 07:19 PM   #1
radnix
Member
 
Registered: Aug 2002
Location: Huntsville AL
Distribution: redhat 7.3
Posts: 48

Rep: Reputation: 15
alter the root name


Hi,

Very simple question here : Is it possible to change the logon name for root from root to anything else ? [ not passwd ]

Thanks ahead :
 
Old 10-25-2002, 10:11 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
A name is a name (ie apps don't check against "name" but ask for a function to return effective uid etc), but what did you have in mind with it if I may ask? Renaming is in the category of "security through obscurity", in some circumstances counted as a deterrant, this easily turns into a false sense of security.
 
Old 10-26-2002, 11:10 AM   #3
radnix
Member
 
Registered: Aug 2002
Location: Huntsville AL
Distribution: redhat 7.3
Posts: 48

Original Poster
Rep: Reputation: 15
good point

You have a good point there. A false sense of security, hummm : do ya' mean that someone that really knows how to detect root priviledges' would not really attempt to logon as root and 'chip' away at the password, but would rather attempt more obvious routes of control?

Wouldn't any additional security measures, such as changing the named "root" confuse the first attempt probing of a system since most would expect root to exist?

What do you think is the best way to 'cloak' root. or is it necessary.
 
Old 10-26-2002, 11:33 AM   #4
Hko
Senior Member
 
Registered: Aug 2002
Location: Groningen, The Netherlands
Distribution: Debian
Posts: 2,536

Rep: Reputation: 111Reputation: 111
Yes, it think it's very well possible to change root's name.
I guess it is even very well possible to have 10 root-equivalent users.

Just don't.
 
Old 10-26-2002, 12:03 PM   #5
radnix
Member
 
Registered: Aug 2002
Location: Huntsville AL
Distribution: redhat 7.3
Posts: 48

Original Poster
Rep: Reputation: 15
OK, how shall we do it, any other thoughts on root security?
 
Old 10-26-2002, 01:19 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
I guess the important point is to not look at the root account as the userid that has the name root (a static attribute w/o impact), but to see it as the userid that has ownage over privileges like POSIX capabilities (CAP_SYS_MOD or the ability to handle module loading, CAP_OVERRIDE or the ability to override file access restrictions, to name just two of the 27). So, you can change the name but the other attributes stay. (I finally get to say "ergo") Ergo, "security through obscurity", cuz nothing important changes.

Take away the capabilities and, in some cases, even root can't regain these capabilities w/o reboot (quite nasty with some caps). Changing capability usage you can do with different approaches like Grsecurity or LIDS kernel patches, or a binary like lcap with which you can take away, say CAP_SYS_MOD, after bootup.

*If you're gonna play with caps, be sure to read for instance lcap's README or another doc on caps.
 
Old 10-26-2002, 03:23 PM   #7
markus1982
Senior Member
 
Registered: Aug 2002
Location: Stuttgart (Germany)
Distribution: Debian/GNU Linux
Posts: 1,467

Rep: Reputation: 46
Quote:
Take away the capabilities and, in some cases, even root can't regain these capabilities w/o reboot (quite nasty with some caps). Changing capability usage you can do with different approaches like Grsecurity or LIDS kernel patches, or a binary like lcap with which you can take away, say CAP_SYS_MOD, after bootup.

*If you're gonna play with caps, be sure to read for instance lcap's README or another doc on caps.
lcap is a really nice proggy to deal with when securing a server. I'll add it to my security tools section for now It's nice that it checks the capabilities currently avaible and lists them, etc - quite helpful - especially the kernel module capabilitiy checking
 
Old 10-26-2002, 10:23 PM   #8
RijilV
Member
 
Registered: Sep 2002
Location: somewhere
Distribution: gentoo
Posts: 123

Rep: Reputation: 15
anyhow, its really easy to change root's name

vipw and change the word root to something.


keep in mind, stuff like "su" will break in the traditional sense, you'll have to do a
su -u <whatever you wanted root to be called>

as stated above, this really doesn't provide much in the way of sekurity. Logging in as your re-named root is still very very bad, any exploits aren't going to be looking up the UID of root, and if you are so worreid about people trying to brute force your root password...well you might just want to set a good password and look at your logs...
 
Old 10-27-2002, 04:04 AM   #9
radnix
Member
 
Registered: Aug 2002
Location: Huntsville AL
Distribution: redhat 7.3
Posts: 48

Original Poster
Rep: Reputation: 15
Thumbs up security through obscurity

Ah yes, I understand now.

I'll checkout Grsecurity, LIDS and lcap.

I think that Rijilv [and as everybody else also suggested] got straight to the point in saying that altering the root name is a waste of effort.

Good passwd selection first line defense against brute force crack attack.

Thank you all !
 
Old 05-16-2003, 07:30 AM   #10
hbo
LQ Newbie
 
Registered: Feb 2003
Distribution: Red Hat 6.2 thru 9, Debian Woody
Posts: 8

Rep: Reputation: 0
getpwnam

And the reason su fails must be because it uses the getpwnam(3) library routine to look up root by the name 'root'. So that's an added caveat to consider when contemplating a change to the UID 0 user's username. There will be problems, perhaps obscure and hard to track down, if a random piece of software tries to getpwnam('root').

One approach to take is to set root's password to some ugly random string. Save it in a locked file cabinet somewhere and use sudo to do all your root work. It makes it tough for password guessing attacks if the password is random garbage. As others have noted, it won't protect you from all, or even most attacks that try to break root, but it's one step that can be taken along with others to improve security.
 
Old 05-17-2003, 07:07 PM   #11
drthornt
Member
 
Registered: May 2001
Location: Toronto
Distribution: RH 7.2
Posts: 33

Rep: Reputation: 15
Not all programs are smart enough to follow uid=0, some foolishly refer to the "sooperuser" as "root".

Standard Modu Operandi on a winbloze box is to rename the account called "Administrator" to someting else and create a a user called "Administrator" with no privs.

For the same reason it is reasonable to do this in a unix machine, however:

1. some programs that you want to work might not be built smart and may follow the user "called" "root" rather than uid=0.

2. unix hackers are smarted and more often than not follow uid=0 so it's not as effective to rename root.
 
  


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
how to alter partition size ? minil Linux - Software 2 07-06-2005 10:46 AM
Can you use GDB to alter memory? tim_l Linux - Software 0 02-25-2005 05:19 AM
alter a makefile toastermaker Linux - Software 1 02-17-2004 05:49 PM
How do I alter the PATH? fedetxf Linux - General 2 12-10-2003 06:50 AM
how to alter the workgroup name on linux skeav Linux - Networking 2 05-13-2002 08:49 AM

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

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