Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
Hi, Is the user name "root" constant? I mean can we change the user name for the root user ( having user id 0) to something else and it can ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jul 2005
    Posts
    6

    User name of the system admin


    Hi,

    Is the user name "root" constant? I mean can we change the user name for the root user ( having user id 0) to something else and it can still have the root privilage?

    Similarly is it possible to add a new user and give him/her all the privilages the root has?


    Thanks in advance for your help/suggestions.
    Basu.

  2. #2
    Linux Engineer
    Join Date
    Apr 2005
    Location
    Belgium
    Posts
    1,429
    I doubt it. Then you would have to change quite a lot. What you could do is give yourself total root privileges, that's a bit the same, but then you better stick with Windows
    ** Registered Linux User # 393717 and proud of it ** Check out www.zenwalk.org
    ** Zenwalk 2.8 - Xfce 4.4 beta 2- 2.6.17.6 kernel = Slack on steroids! **

  3. #3
    Linux Guru techieMoe's Avatar
    Join Date
    Aug 2004
    Location
    Texas
    Posts
    9,496

    Re: User name of the system admin

    Quote Originally Posted by basudevagrawal
    Hi,

    Is the user name "root" constant? I mean can we change the user name for the root user ( having user id 0) to something else and it can still have the root privilage?
    Interesting question, but I don't know of anyone that's actually tried it. It would more than likely be an awful lot of work for very little gain.

    Similarly is it possible to add a new user and give him/her all the privilages the root has?
    Yes, this is possible however I question why it is that you want to do this? Root user is designed to be used only for system administration tasks, not everyday activities. It's a security issue. Making a regular user have all the privileges of root can be dangerous, even for a seasoned Linux user. When you have root permissions, the system assumes you know what you're doing. You could very well accidentally delete your entire operating system with one command.
    Registered Linux user #270181
    TechieMoe's Tech Rants

  4. #4
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    I mean can we change the user name for the root user ( having user id 0) to something else and it can still have the root privilage?
    Possibly. But why?

  5. #5
    Just Joined!
    Join Date
    Jul 2005
    Posts
    6
    Hi,

    Thanks for your replies.

    What I need to do is find out in a C program, if the current user is just an ordinary user or is a system administrator(having privilages same as "root"). The obvious thing to do will be to check if the user name is "root".

    However if there is an possiblity of an user having a user name other than "root" being a system administrator, then I have to take that into consideration as well.

    So how do I identify whether the current user is a system administrator or not?

    Thanks in advance for your thoughts/suggestions.
    Basu.

  6. #6
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    It's user ID 0 that's special, not the name atrributed to it. You can also have more than one entry in /etc/passwd with a user ID of zero - for instance I make my shutdown user have an ID of 0.

  7. #7
    Linux User
    Join Date
    Jul 2005
    Posts
    369
    i renamed the root user then created a fake "root" user with no privliges...just to confuse people

  8. #8
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    I intended doing this myself actually bt never have. What's the best way to do it? It is standard procedure in Windows admin to change the name of the administrator account ASAP, although better to do it during installation.

  9. #9
    scm
    scm is offline
    Linux Engineer
    Join Date
    Feb 2005
    Posts
    1,044
    Quote Originally Posted by bigtomrodney
    I intended doing this myself actually bt never have. What's the best way to do it? It is standard procedure in Windows admin to change the name of the administrator account ASAP, although better to do it during installation.
    Yes, but Linux security is designed in, whereas in Windoze it was added a very inadequate afterthought, which is why you need admin privileges to run user programs. With Linux, you protect the root account with a sensible password, and rarely have to use it for user apps, since you can tweak the privileges appropriately on a per-user basis. If you think you need to change root's name, you're going against 30 plus years of UNIX admin experience. As I've posted in another thread, don't cripple Linux just to make it as poor as Windoze.

  10. #10
    Linux Guru bigtomrodney's Avatar
    Join Date
    Nov 2004
    Location
    Ireland
    Posts
    6,132
    I certainly wouldn't try to! The reason I've asked isn't for fun, but as a dummy for any cracker wannabes. For instance I was thinking of creating a fake root and using chroot and some other bits creating a cage to see what a would be attacker would do. I have had a lot of brute force attacks, or attempts I should say through ssh, and I would like to know what goes on in the successful ones.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •