Find the answer to your Linux question:
Results 1 to 3 of 3
Hi, For testing purposes, I've tried adding a second root user using: useradd -o -u 0 root2 However now, when I do su - I am prompted for the root ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Mar 2008
    Posts
    7

    Removing the second root...


    Hi,

    For testing purposes, I've tried adding a second root user using:

    useradd -o -u 0 root2

    However now, when I do su - I am prompted for the root password but I get into root2 home....

    I want to revert to the root home.. without screwing up both root accounts lol

    Thanks!

  2. #2
    Linux Guru anomie's Avatar
    Join Date
    Mar 2005
    Location
    Texas
    Posts
    1,692
    You can use userdel or directly edit /etc/passwd & /etc/shadow with vipw (take care to delete the same account in both). You may need to delete root2's home directory manually.

    There's normally not a good reason to be adding a second account with UID 0. If another user requires some root-level privileges, then add him as a sudoer.

  3. #3
    Just Joined!
    Join Date
    Mar 2008
    Posts
    7
    Quote Originally Posted by anomie View Post
    There's normally not a good reason to be adding a second account with UID 0. If another user requires some root-level privileges, then add him as a sudoer.
    oh well I guess THAT's what I was looking for!

    I have no clue on how its done... I'll go search...


    *edit* If anyone needs to do the same, very clear & simple here:
    How to add a user to the sudoers list | USB Pen Drive Linux

  4. $spacer_open
    $spacer_close

Posting Permissions

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