Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Help, I am Locked from my system

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    84

    Help, I am Locked from my system


  2. #2
    Junior Member
    Join Date
    Jan 2002
    Posts
    84

    Re: Help, I am Locked from my system

    I insrted RH 7.2 CD 1 and entered rescue mode but I dont know what to edit or fix so I can log back on as before

    Before I used to just pick KDE or GNOME, enter root, and roots password

    Do you know what I have to edit

    I looked in the /etc/passwd file and it said root........./bin/bash (at the end)

    I rebooted and I get the same

  3. #3

    Re: Help, I am Locked from my system

    I insrted RH 7.2 CD 1 and entered rescue mode but I dont know what to edit or fix so I can log back on as before

    Before I used to just pick KDE or GNOME, enter root, and roots password

    Do you know what I have to edit

    I looked in the /etc/passwd file and it said root........./bin/bash (at the end)

    I rebooted and I get the same
    Make sure all they syntax is correct in the line, not just that it says /bin/bash, but that all the colons are in their right places, that you're home dir exists, etc. If your password is still posted where you put it earlier, just download it, stick it on a floppy and copy it back to /etc while in repair mode. Just make sure not to edit on your windows box as it will definately bugger it to hell.

  4. #4
    Senior Member
    Join Date
    May 2001
    Posts
    411

    Re: Help, I am Locked from my system

    Have you tried using your emergency boot diskette?

  5. #5

    Re: Help, I am Locked from my system


    Have you tried using your emergency boot diskette?
    I think he can get the system booted ok, just not log on as root. Most likely his /etc/passwd messed up since he was editing it manually sometime during the day.

  6. #6
    Junior Member
    Join Date
    Jan 2002
    Posts
    84

    Re: Help, I am Locked from my system

    Ok, I think I found the problem but I need help

    I re did the linux rescue and this is what it said when it started.
    Code:
    RESCUE
    Your sytem has been mounted under
    /mnt/sysimage
    
    Press enter to get to the shell. If you would like to make your system the root environment run the command
    
    chroot /mnt/sysimage
    
    The sytem will reboot automatically exit the shell
    
    OK *SKIP
    I pressed ok and it went to a command "sh-2.05#"

    From here I went to *

    cd /etc
    ls
    pico passwd
    and this is what passwd said
    Code:
    root::0:0:root:/:/bin/bash
    As I said before I was editing this file on a windows machine on my LAN when I was trying to setup proftpd. *I luckily had this passwd file on my windows machine and this is what it said

    Code:
    root:x:0:0:root:/root:/bin/bash
    bin:x:1:1:bin:/bin:/sbin/nologin
    daemon:x:2:2:daemon:/sbin:/sbin/nologin
    adm:x:3:4:adm:/var/adm:/sbin/nologin
    lp:x:4:7:lp:/var/spool/lpd:/sbin/nologin
    sync:x:5:0:sync:/sbin:/bin/sync
    shutdown:x:6:0:shutdown:/sbin:/sbin/shutdown
    halt:x:7:0:halt:/sbin:/sbin/halt
    mail:x:8:12:mail:/var/spool/mail:/sbin/nologin
    news:x:9:13:news:/var/spool/news:
    uucp:x:10:14:uucp:/var/spool/uucp:/sbin/nologin
    operator:x:11:0:operator:/root:/sbin/nologin
    games:x:12:100:games:/usr/games:/sbin/nologin
    gopher:x:13:30:gopher:/var/gopher:/sbin/nologin
    ftp:x:14:50:FTP User:/var/ftp:/bin/false
    nobody:x:99:99:Nobody:/:/sbin/nologin
    mailnull:x:47:47::/var/spool/mqueue:/dev/null
    rpm:x:37:37::/var/lib/rpm:/bin/bash
    xfs:x:43:43:X Font Server:/etc/X11/fs:/bin/false
    ntp:x:38:38::/etc/ntp:/sbin/nologin
    rpc:x:32:32:Portmapper RPC user:/:/bin/false
    gdm:x:42:42::/var/gdm:/sbin/nologin
    rpcuser:x:29:29:RPC Service User:/var/lib/nfs:/sbin/nologin
    nfsnobody:x:65534:65534:Anonymous NFS User:/var/lib/nfs:/sbin/nologin
    nscd:x:28:28:NSCD Daemon:/:/bin/false
    ident:x:98:98:pident user:/:/sbin/nologin
    radvd:x:75:75:radvd user:/:/bin/false
    apache:x:48:48:Apache:/var/www:/bin/false
    squid:x:23:23::/var/spool/squid:/dev/null
    pcap:x:77:77::/var/arpwatch:/bin/nologin
    mysqlusr:x:500:500::/home/mysqlusr:/bin/bash
    marc:x:501:501::/var/ftp/marc:/bin/false  <-- this was the ftp user that I added with bin/flase
    As you can see the 'root" is missing an 'x" so I went to pico and edited the file within rescue. *i have never done this before so I am not sure if I am doing it right

    Anyways I told it to save the buffer over the curent /etc/passwd file with the "x" there

    I rebooted and again it said CANNOT START YOUR SHELL, IT COULD BE THAT THE SYSTEM ADMIN ...........
    It lloks like the password is ok but it wont atart the KDE or GNOME

    I went back to linux recue cd'd over the /etc/passwd and again it did not take , it still says
    Code:
    root::0:0:root:/:/bin/bash
    So it looks like whin I am *saving the file in pico, the file is not saving

    Do I have to do something else to edit and then save that file so I can change it to read
    Code:
    root:x:0:0:root:/root:/bin/bash

  7. #7

    Re: Help, I am Locked from my system

    Ok here's the deal. When you run the rescue disk, you are actually in a temporary filesystem that's running in RAM. What this means is that you are not really looking at the stuff on your hard drive. So, any changes you make to that filesystem (to it's /etc/passwd, for instance), are instantly lost upon reboot.

    Luckily, you're real data is mounted under /mnt/sysimage. So just cd over to /mnt/sysimage/etc and edit that passwd file. That's where the stuff on your hard drive will be located. Does that make any sense?

    If you used Winduhs to edit you're passwd file, your probably done for. Windows leaves carriage retuns (^M) at the end of everything and well, linux hates this. Now when this happens to /etc/passwd, linux really hates this. The stuff in passwd is most likely correct, its just that winduhs fscked it all up.

    You're best bet at this point is to retrieve your original passwd file from where you put it on the net. Unzip it (you had it zipped right?), and before opening it (don't open it in fact) put it on a floppy disk. Now boot RH in rescue mode. Mount your floppy drive by issuing a:

    mount /dev/fd0

    Then copy your passwd file to where it needs to go--

    cp /mnt/floppy/passwd /mnt/sysimage/etc/passwd

    The only thing that may foul up this process is if the you don't have a pre-windows-edited copy of passwd. Also, I'm not sure if the RH rescue mode will read VFAT partitions or if /etc/fstab will have the correct entries to even mount your floppy. It probably will, but who knows.

    If the above dosen't work, you can get rid of the carriage returns manually and resave /etc/passwd. There is a good turorial in the Plain English Tutorials on this site that can help you with that: http://www.linuxjunior.org/cgi-bin/p...play&id=11

    Give this all a shot. If it dosen't work, you may have to re-install. Which, since you are very new to Linux, you'll probably have to do a few more times.

    Good luck.

  8. #8
    Junior Member
    Join Date
    Jan 2002
    Posts
    84

    Re: Help, I am Locked from my system

    I will try all of that, thanks

    before I ZIPed it up and put in on the net I opened it with ultredit. *It asled me about DOS format and i dont remeber if I said yes or NO

    I do have /etc/passwd- on my windows machine too. *I think that one is ok but it is a different passwd file

    Is there a windows program that I can edit my linux computer files with. *The reason why I do it this way is because I do everything through SSH on my windows machine. *Its alot easier to get to than the linux computer


    Lastly, what exactly should I change
    Code:
    root::0:0:root:/:/bin/bash
    this file to say

    and should I
    Code:
    chroot /mnt/sysimage
    That was the only line on the file when I checked before but as you can see it has much more

  9. #9
    Junior Member
    Join Date
    Jan 2002
    Posts
    84

    Re: Help, I am Locked from my system

    Thank You, I am back up

    All I did was resave it within in pico while I was in chroot /mnt/sysimage

    Now back to setting up proftpd

    Do you know a windows editor that wont screw up these files

  10. #10
    Moderator
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Location
    Milwaukee, WI
    Posts
    5,760

    Re: Help, I am Locked from my system

    If you edit it and save it in ASCII format, you should be fine. You may need to touch the file too, to get the file permission bits set. I may be wrong about touch. I merely use Windows for Rogue Spear right now -- nothing else. I never tried doing this, however logic states that since you arent changing formats, you should be okay.

Similar Threads

  1. Win2000 SBS users kicked off and locked
    By theon in forum Windows - General Topics
    Replies: 7
    Last Post: 01-14-2005, 11:41 PM
  2. vsftpd dead but subsys locked
    By Sitaram in forum Linux - General Topics
    Replies: 0
    Last Post: 11-23-2004, 12:50 PM
  3. Locked Topics
    By BadDudes in forum General Chat
    Replies: 0
    Last Post: 11-03-2004, 04:24 AM
  4. Locked Thread - Saddam's Sons Killed
    By trickster in forum Announcements and Suggestions
    Replies: 2
    Last Post: 08-22-2003, 07:37 AM
  5. Still Locked out
    By stodgel in forum Mandriva
    Replies: 4
    Last Post: 01-18-2003, 11:52 PM

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
  •