Results 1 to 7 of 7

Thread: How to change root's login name

  1. #1
    Join Date
    Jul 2008
    Beans
    37
    Distro
    Ubuntu 12.04 Precise Pangolin

    How to change root's login name

    Earlier today I got the urge to change root's login name on one of my old Ubuntu boxes. I did "sudo usermod -l stan root", to change root's name to 'stan' (you know, it's more personal that way) But then when I try to 'sudo' anything (in a DIFFERENT shell...of course I leave my root shell open and keep a backup of the important files when I do stuff like this!), sudo complains that there's no entry for root in the passwd file. Is there a way to change sudo to look for stan's entry instead of root?

    Perhaps my question could be widened: Is there a way to change root's name and not have it affect my system very much?
    Last edited by gkaragoulis; August 14th, 2008 at 01:10 AM. Reason: security clarification

  2. #2
    Join Date
    Feb 2007
    Beans
    Hidden!
    Distro
    Kubuntu 10.10 Maverick Meerkat

    Re: How to change root's login name

    You can't change the login name for root and shouldn't try.

    You certainly shouldn't be running as root often enough to feel the need to personalize it
    There is NO such thing as a humble opinion
    Remember : RUNNING UNKNOWN COMMANDS CAN DAMAGE YOUR COMPUTER
    Please read and ensure you understand the entire thread before posting to avoid redundant and/or irrelevant and/or misleading posts.

  3. #3
    Join Date
    Mar 2008
    Location
    Earth
    Beans
    189

    Re: How to change root's login name

    Quote Originally Posted by solar george View Post
    You can't change the login name for root and shouldn't try.

    You certainly shouldn't be running as root often enough to feel the need to personalize it
    This. Running as root isn't like being an Administrator on Windows, it's much, much more dangerous. Being in the sudoers file is plenty power for 9/10 situations a home user will run into.

  4. #4
    Join Date
    Apr 2008
    Location
    Ede, Netherlands
    Beans
    36
    Distro
    Ubuntu 8.10 Intrepid Ibex

    Lightbulb Re: How to change root's login name

    Quote Originally Posted by solar george View Post
    You can't change the login name for root and shouldn't try.
    The reason for this is that a lot of important programs on your system (like sudo) need to have a root account, this is hardcoded since this doesn't change that much.
    So when you change the name a lot of programs simply don't work anymore and you probably get problems when rebooting the system...

  5. #5
    Join Date
    Jun 2006
    Location
    Switzerland
    Beans
    Hidden!
    Distro
    Kubuntu Jaunty Jackalope (testing)

    Re: How to change root's login name

    you could however create an alias. Add a new user and then change its UID to match the root one.

  6. #6
    Join Date
    Jul 2008
    Beans
    37
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: How to change root's login name

    Quote Originally Posted by hyper_ch View Post
    you could however create an alias. Add a new user and then change its UID to match the root one.
    That's a great idea, I think I'll try that.

    BTW, I only do this because at work I administer at least 10 different linux Virtual computers, and I can make and break them without consequence because we have such redundant backups of them. I literally created a linux computer just so I could change root's name to Satan.

    (...don't tell my boss...)

  7. #7
    Join Date
    Apr 2008
    Location
    Austin, TX
    Beans
    39
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to change root's login name

    Add a new user and then change its UID to match the root one.
    This is the typical way to accomplish what you want. It will also get you jeered by security dorks when they catch you running as root for doing normal non-root things (personal experience).

Bookmarks

Posting Permissions

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