Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 19
Ok i am new to linux and i think i screwed something up already.. First i think i deleted the root account?! When i go to the user and groups ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2003
    Posts
    11

    New to linux and i have two (basic) problems..


    Ok i am new to linux and i think i screwed something up already..

    First i think i deleted the root account?! When i go to the user and groups panel ut says unknown user.. i can't login as root neither..

    Second.. I screwed up the panels somehow.. I liked how in the beginning it had the bottom panel with the four workspaces and the redhat button. Now i just have one bar on the top (kind of like mac os 9)


    I am running Linux Redhat 9 .

    Thanks for any of your help.

  2. #2
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I'm not sure those are really symptoms that you have deleted your root account. Many login programs prevent root logins (since you're not supposed to log in as root), and the users and groups thing that RH has made usually doesn't show system accounts (those with UID<100, root has UID=0). If you run "su -" from a terminal, doesn't that work with your root password?

    It sounds as if you simply want to move your panel, right? If this is GNOME that we're talking about, just right-click the panel and choose the position where you want it to be.

  3. #3
    Just Joined!
    Join Date
    Dec 2003
    Posts
    11
    I also can't do anything under the system settings... everytime i try to go to something under system settings it gives me the same error... unknown user. I was able to login to root until i screwed it up... now it just doesn't accept the password. Is there a way i can recreate a root account or an account with root capabilities? I imagine i would have to do this inside the command line since i keep getting the error on the graphical interface? When I type SU into the terminal it says "su: user root does not exist"

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Then, how much is screwed up? Would you mind posting your /etc/passwd (don't worry, the passwords aren't in there; they are in /etc/shadow)?

  6. #5
    Just Joined!
    Join Date
    Dec 2003
    Posts
    11
    well i can't get onto anything under the system tools or run any rpms by clicking on them. I am new to linux so i have nothing important on the linux portion of this computer or in certain accounts so destroying/creating accouts doesn't bother me at all... what information do you need? just tell me where i can find it and i will tell you... and thanks i was able to get my interface back just the way i like it.. i love how much more customizable it is than windows.
    ---- here is what that file has that you asked--- ( i just changed my last name)-----------
    om:500:0:Tom Smith:/home/tom:/bin/bash
    bin:1:1:bin:/bin:/sbin/nologin
    daemon:2:2:daemon:/sbin:/sbin/nologin
    adm:3:4:adm:/var/adm:/sbin/nologin
    lp:4:7:lp:/var/spool/lpd:/sbin/nologin
    sync:5:0:sync:/sbin:/bin/sync
    shutdown:6:0:shutdown:/sbin:/sbin/shutdown
    halt:7:0:halt:/sbin:/sbin/halt
    mail:8:12:mail:/var/spool/mail:/sbin/nologin
    news:9:13:news:/etc/news:
    uucp:10:14:uucp:/var/spool/uucp:/sbin/nologin
    operator:11:0:operator:/root:/sbin/nologin
    games:12:100:games:/usr/games:/sbin/nologin
    gopher:13:30:gopher:/var/gopher:/sbin/nologin
    ftp:14:50:FTP User:/var/ftp:/sbin/nologin
    nobody:99:99:Nobody:/:/sbin/nologin
    rpm:37:37::/var/lib/rpm:/bin/bash
    vcsa:69:69:virtual console memory owner:/dev:/sbin/nologin
    nscd:28:28:NSCD Daemon:/:/sbin/nologin
    sshd:74:74:Privilege-separated SSH:/var/empty/sshd:/sbin/nologin
    rpc:32:32:Portmapper RPC user:/:/sbin/nologin
    rpcuser:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
    nfsnobody:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
    mailnull:47:47::/var/spool/mqueue:/sbin/nologin
    smmsp:51:51::/var/spool/mqueue:/sbin/nologin
    pcap:77:77::/var/arpwatch:/sbin/nologin
    xfs:43:43:X Font Server:/etc/X11/fs:/sbin/nologin
    ntp:38:38::/etc/ntp:/sbin/nologin
    gdm:42:42::/var/gdm:/sbin/nologin
    ------------------------------------------------------------------------------------------------

  7. #6
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Indeed the root account is gone. I can't help wondering whatever you could have done to cause that without altering the rest of the file.

    Anyway, to fix it, you need to boot the system in single user mode. Since you're using RH9, I'm assuming that your boot loader is GRUB (RH9 installs GRUB by default, so if you haven't explicitly changed it, it is GRUB).
    When you boot your system and see the nice menu that allows you to choose which O/S to boot, press "e" to edit the GRUB boot commands. Select the line that begins with "kernel", press "e" again to edit that one, and add a space and a 1 to the end of that line. Press enter to acknowledge that changes made to the line, and then press "b" to boot.
    When the system has booted into single user mode, you should get a prompt that reads something like "sh-2.05b#". Enter the following commands, exactly as they read. Do not proceed if any of them fails
    Code:
    mount -n -o remount,rw /
    echo 'root&#58;x&#58;0&#58;0&#58;root&#58;/root&#58;/bin/bash' >>/etc/passwd
    sort -t &#58; -k 3n /etc/passwd >/etc/passwd.new
    mv -f /etc/passwd.new /etc/passwd
    passwd root
    The last command will ask you for a password. Enter the password that you want root to have.
    Then, after that, run "telinit 5" to continue booting the system into full multi-user operation.

  8. #7
    Just Joined!
    Join Date
    Dec 2003
    Posts
    11
    ok everything went good until i got to
    Code:
    mv -f /etc/passwd.net /etc/passwd
    when i entered that i got this..
    Code:
    mv&#58; can't stat source /etc/passwd.net
    ok.. now instead of giving me the unknown user error when using linux it asks me for the root password (which i didn't make yet)

  9. #8
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Sorry, typo. It should be passwd.new, not passwd.net. Sorry about that. Original post edited to correctness.

  10. #9
    Just Joined!
    Join Date
    Dec 2003
    Posts
    11
    ok.. i changed passwd.net to passwd.new which worked.. than i did passwd root but got an error authentication token manipulation error..... hahah i just read your post now.. i thought that might be it when i went back.. so i tried it and it worked but got this token manipulation error

  11. #10
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Is that so? Could it be that you ran the preceeding commands again? You should not have run the echo command twice (I should have mentioned that). If you did that, it is fortunately rather easy to remedy. Run these commands to fix such a situation:
    Code:
    sort /etc/passwd | uniq >/etc/passwd.new
    mv -f /etc/passwd.new /etc/passwd
    If that was not the case, or if you do the above and still get that error, I will need some log dumps to debug the error. For messages to be logged to begin with, you must start the syslog daemon before attempting to set the password. Do that with this command:
    Code:
    /sbin/service syslog start
    After that, when you have attempted to change the password, get the log dump using this command:
    Code:
    tail -20 /var/log/&#123;messages,secure&#125;
    To easily save the output for inclusion, you can modify the command like this:
    Code:
    tail -20 /var/log/&#123;messages,secure&#125; >/tmp/logdump
    The output will then be saved in /tmp/logdump so that you can simply open that file and copy/paste when you reply.

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
  •