LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-21-2002, 02:18 AM   #1
Kaiser_Sose
Member
 
Registered: Jan 2002
Posts: 53

Rep: Reputation: 15
Help, I am Locked from my system


I was installing proftpd and adding users giving them a /bin/false . All of a sudden the next time I try to SSH into the linux machine on m LAN I am locked out

help

I am now locked out of my system as root and I cant get in

I went to enter an SSH session , I tried to logon and it wasnt accespting roots password

I walked over the linux machine, rebooted, tried to logon as root/password and it said CANNOT START YOUR SHELL, IT COULD BE THAT THE SYSTEM ADMIN ...........

How do I fix this
 
Old 01-21-2002, 02:19 AM   #2
Kaiser_Sose
Member
 
Registered: Jan 2002
Posts: 53

Original Poster
Rep: Reputation: 15
Hi, I am using RH 7.2

I insrted RG 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
 
Old 01-21-2002, 02:19 AM   #3
Kaiser_Sose
Member
 
Registered: Jan 2002
Posts: 53

Original Poster
Rep: Reputation: 15
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
 
Old 01-21-2002, 05:25 AM   #4
Steave
Member
 
Registered: Jul 2001
Location: Braunschweig, Germany
Distribution: Suse 7.2
Posts: 184

Rep: Reputation: 30
Not bad so far. I'd say you just missed one little point: Your System's root is mounted under /mnt/sysimage. So you'll have to edit the /mnt/sysimage/etc/passwd file so the changes to take effect on your system.
 
Old 01-21-2002, 09:34 AM   #5
Kaiser_Sose
Member
 
Registered: Jan 2002
Posts: 53

Original Poster
Rep: Reputation: 15
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
 
Old 02-03-2004, 01:58 AM   #6
frieza
Senior Member
 
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,200

Rep: Reputation: 397Reputation: 397Reputation: 397Reputation: 397
i can't think of a windows editor, but if you have ms-dos editor or qbasic it might work
 
Old 02-03-2004, 08:39 AM   #7
lone_nut
Member
 
Registered: Dec 2003
Location: Denmark
Distribution: Mandrake
Posts: 179

Rep: Reputation: 30
notepad?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
locked out kwickcut Mandriva 6 11-14-2005 11:09 PM
Locked out of RH 9 carmoda Linux - Security 3 12-16-2003 10:44 AM
Locked out downinthemine Mandriva 1 10-28-2003 05:00 PM
Locked out captain_bogus Linux - Newbie 11 08-11-2003 05:32 PM
locked out of X VioLaToR Linux - Newbie 15 11-12-2002 05:36 AM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration