PDA

View Full Version : Can you change root?



Darakian
06-23-2009, 01:14 AM
Strage question but does anyone know a way of changing either the name of root to say bob or joe, or of making a new root and locking out or removing the old root?

W1zzard
06-23-2009, 04:38 AM
you can, but why? your root account should have a sufficient password
disable remote root logins via anything including ssh, only allow root to become root via normal user login and then su

ownage
06-23-2009, 04:42 AM
You will run into troubles if you rename root (first hand experience :D).
Like W1z says, use SU to become root. Change the sudoers file and add

user1 ALL = (ALL) ALL

To become root type:

sudo -i

And you will be root.

WrigleyVillain
06-23-2009, 06:21 AM
Why would you rename root? Some crazy ass attempt at more security?

W1zzard
06-23-2009, 07:20 AM
Why would you rename root? Some crazy ass attempt at more security?

probably, but unfortunately it wont do you much (anything?) good

if an attacker is able to login to a system shell he can easily find out the root account name.
remote root exploits are very very rare and get fixed in no time usually, and they dont work like "login: root, password: secretbackdoorpasswordthensauses"

Darakian
06-23-2009, 10:45 PM
more of a practical joke actually, but the security aspect would be interesting. :D

Gogeta
08-11-2009, 06:40 AM
You could change the bash prompt by editing root's .bashrc file. :)

rogard
09-05-2009, 02:43 PM
Any user account with a uid/gid of 0 will be a root account.

You can use the "-o" on "adduser" in most linux based distro to add a non-unique uid/gid.

You can then delete the root account.