[vox-tech] Not able to log into root.

Peter Jay Salzman vox-tech@lists.lugod.org
Tue, 23 Apr 2002 14:11:33 -0700


why did you post /etc/passwd?

it would be more helpful if you posted the contents of /etc/shadow.


pete "just tryin' to be helpful"



begin Rusty Minden <clownsinc@attbi.com> 
> I will from now on use less and more.
> 
> This is /etc/passwd
> root:x:0:0:root:/root:/bin/bash
> bin:x:1:1:bin:/bin:/bin/bash
> daemon:x:2:2:Daemon:/sbin:/bin/bash
> lp:x:4:7:Printing daemon:/var/spool/lpd:/bin/bash
> games:x:12:100:Games account:/var/games:/bin/bash
> at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash
> postgres:x:26:2:Postgres database admin:/var/lib/pgsql:/bin/bash
> mdom:x:28:28:Mailing list agent:/usr/lib/majordomo:/bin/bash
> wwwrun:x:30:65534:WWW daemon apache:/var/lib/wwwrun:/bin/bash
> squid:x:31:65534:WWW proxy squid:/var/squid:/bin/bash
> fax:x:33:14:Facsimile agent:/var/spool/fax:/bin/bash
> gnats:x:34:65534:Gnats GNU backtracking system:/usr/lib/gnats:/bin/bash
> adabas:x:36:100:Adabas-D database admin:/usr/lib/adabas:/bin/bash
> amanda:x:37:6:Amanda admin:/var/lib/amanda:/bin/bash
> irc:x:39:65534:IRC daemon:/usr/lib/ircd:/bin/bash
> ftp:x:40:2:FTP account:/usr/local/ftp:/bin/bash
> firewall:x:41:31:Firewall account:/var/lib/firewall:/bin/false
> named:x:44:44:Nameserver daemon:/var/named:/bin/bash
> fnet:x:49:14:FidoNet account:/var/spool/fnet:/bin/bash
> gdm:x:50:15:Gnome Display Manager daemon:/var/lib/gdm:/bin/bash
> postfix:x:51:51:Postfix daemon:/var/spool/postfix:/bin/false
> cyrus:x:96:12:IMAP daemon:/usr/cyrus:/bin/bash
> dpbox:x:61:56:DpBox account:/var/spool/dpbox:/bin/false
> ingres:x:62:3:Ingres database admin:/opt/tngfw/ingres:/bin/bash
> vscan:x:65:65534:Vscan account:/var/spool/vscan:/bin/false
> wnn:x:66:100:Wnn system account:/var/lib/wnn:/bin/false
> pop:x:67:100:POP admin:/var/lib/pop:/bin/false
> perforce:x:68:60:Perfoce admin:/var/lib/perforce:/bin/false
> sapdb:x:69:61:SAPDB demo account:/var/opt/sapdb:/bin/bash
> db4web:x:70:100:DB4Web account:/opt/db4web:/bin/bash
> nobody:x:65534:65534:nobody:/var/lib/nobody:/bin/bash
> rdm:x:500:100:Roland (Rusty) Minden:/home/rdm:/bin/bash
> man:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash
> news:x:9:13:News system:/etc/news:/bin/bash
> uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash
> 
> On Tuesday 23 April 2002 12:07 pm, you wrote:
> > as mike pointed out to me in email, it's just better to use a pager like
> > less.  it's a good habit to get into.
> >
> >
> > begin nbs <nbs@sonic.net>
> >
> > > On Tue, Apr 23, 2002 at 11:58:33AM -0700, Rusty Minden wrote:
> > > > Dohh! Yes I do I flubbed when doing a search using vim sorry. Still
> > > > can't use su to log into root.
> > >
> > > You'll probably need to boot into single user mode (err.. if you CAN
> >
> > not quite -- you still need to enter a password in single user mode.
> >
> > > with a botched /etc/passwd), or (more likely) use a rescue disk.
> >
> > you need to boot a rescue disk (the linux BBC or linuxcare cd's are
> > perfect for this sort of thing.  debian rescue disks will work too).
> >
> > then you need to manually mount the root partition read/write.
> >
> > then you need to change the permission on /mnt/bin/su (not on /bin/su,
> > if that makes sense).
> >
> > it's just like when you forget the root password, except you'll be using
> > chmod to change permissions instead of vim to change text between the
> > 2nd and 3rd ":" in /etc/shadow.
> >
> > pete
> >
> > > BTW - use "vipw", not "vim"...  It will, as the man page says,
> > > "set the appropriate locks to prevent file corruption."  I seem to
> > > recall it also complaining and not saving/quitting if the file got
> > > botched up.  (eg, it syntax checks it before committing to disk)
> > >
> > > I could be wrong about that last part, unfortunately... :)
> > > In that case, I guess VIM is good enough.  Just be CAREFUL! ;)
> > >
> > > -bill!