[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to login to a machine with invalid shell in /etc/passwd?





On Tue, 2 Jan 2001, Kevin Sindhu wrote:

> 
> [16:11:51][kevin@tokyo:~]$ su - root
> Password: 
> Jan  2 16:11:56 tokyo su: 'su root' succeeded for kevin on /dev/pts/9
> Sun Microsystems Inc.   SunOS 5.7       Generic October 1998
> # which sh
> /usr/bin/sh
> #/usr/ucb/vipw
> 
> [changed /bin/sh to /bin/ash] (non-existant shell)
> :wq
> "/etc/ptmp" 15 lines, 573 characters 
> Invalid root shell:
> root:x:0:1:Super-User:/:/sbin/ash
> vipw: you mangled the /etc/ptmp file, /etc/passwd unchanged
> Invalid root shell:
> root:x:0:1:Super-User:/:/sbin/ash
> vipw: you mangled the /etc/ptmp file, /etc/passwd unchanged


<--( SNIP )-->

Helu,

  What are you trying to illustrate here exactly? 

  I was fairly certain that '-c /path/to/shell' wouldn't work if root's
shell is non-existant, but I do admit to not double-checking.

  The other methods I offered should work fine.


*shrug*

-- Craig