LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-01-2004, 05:29 AM   #1
bjmurph
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Distribution: Gentoo
Posts: 11

Rep: Reputation: 0
Changing Super User Username


Is it possible to change the super user name?

I don't want to change it to "1337h4x0r", just "admin" or something. It just seems wrong to me to have a user called "root".

If this is possible, then is it posible to change "/root" to some other name? (no symlinkage)
 
Old 10-01-2004, 05:56 AM   #2
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
/root is root's home directory, which is completely seperate from the root user. You can change that setting in the /etc/passwd file (but you'll need to move the directory itself by hand).

I don't see why you couldn't change the root username there as well; the UID and GID have both got to be 0 for a superuser, and various programs that change user (like su or shutdown) will stop working if they use the username rather than the UID (this would constitute a bug in such programs but not one that would get tested for very often).

root is a very standard name for a UNIX superuser — it stems from the idea of a hierarchy of users with inherited permissions; an idea that isn't used.
 
Old 10-01-2004, 06:55 AM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Re: Changing Super User Username

Quote:
Originally posted by bjmurph
Is it possible to change the super user name?

I don't want to change it to "1337h4x0r", just "admin" or something. It just seems wrong to me to have a user called "root".

If this is possible, then is it posible to change "/root" to some other name? (no symlinkage)
Why? Its been like this well, since, Unix was created. Why don't you setup another user with sudo rights? Then you won't ever need to login as root, well very rarely.

Security thru obscurity just doesn't work and there's no real valid reason you should change root's name.
 
Old 10-01-2004, 07:33 AM   #4
bjmurph
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Distribution: Gentoo
Posts: 11

Original Poster
Rep: Reputation: 0
It is not a security reason.

If you read the original post,
Quote:
Originally posted by me
It just seems wrong to me to have a user called "root".
I am referring to the local usage of the word root, ie Synonym of sexual intercourse(noun and verb), and hence rooted, rooting, get a root etc. To me that's what root means. If the super user on your system was called f**k, would that make you particularly happy? So my "real valid reason" is just that I would prefer that the super user be called something else.

I'm not trying to offend any Unix aficionados, or get extra security by making would be attackers guess the name (as I said, I would call it admin), I just don't like "root" being a username.
 
Old 10-01-2004, 08:53 AM   #5
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
I suppose that renaming root is possible, because, AFAIK, the GoboLinux project did it. See:
http://www.gobolinux.org

Yves.
 
Old 10-01-2004, 12:17 PM   #6
bjmurph
LQ Newbie
 
Registered: Sep 2004
Location: Australia
Distribution: Gentoo
Posts: 11

Original Poster
Rep: Reputation: 0
It would seem that while renaming root is trivial (just edit the /etc/passwd, and if you have one, the /etc/shadow), programs will then hate you.

I renamed "root" to "admin", and that was ok, I could log in, do superuser things. The problem occured when I wanted to be a nomal user, and either su in a terminal, or run something like kde's "file manager (super user mode)", it refused to do anything. su returned an error along the lines of cannot find user root, and the other things I think might use su. So it appears that renaming root is a no go if you want things to still work.
 
Old 10-01-2004, 09:17 PM   #7
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Quote:
Originally posted by bjmurph
So it appears that renaming root is a no go if you want things to still work.
Exactly like I said.. "there's no real valid reason you should change root's name" along with the security bit for all those other poeple who have asked thinking it would beef up their security on their system.

Want a user named admin, create one. Give him sudo access, done, everything else is happy.
 
Old 10-11-2004, 03:52 PM   #8
rjlee
Senior Member
 
Registered: Jul 2004
Distribution: Ubuntu 7.04
Posts: 1,994

Rep: Reputation: 76
Quote:
Originally posted by bjmurph
su in a terminal, or run something like kde's "file manager (super user mode)", it refused to do anything. su returned an error along the lines of cannot find user root, and the other things I think might use su.
su is the Switch User command. If you don't specify a username, the default is root, rather than the name of UID 0. You could always do
Code:
su admin
instead of su.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
Running super user commands as normal user mickyg Linux - Security 5 10-14-2005 07:25 PM
changing username Slagazor Linux - Newbie 4 04-18-2005 03:37 PM
Changing LQ username? ksgill LQ Suggestions & Feedback 3 03-06-2005 02:44 PM
Changing username Kramon Mandriva 1 11-24-2003 08:04 PM
changing username evil_lafta Slackware 3 01-15-2003 09:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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