On Mon, Feb 26, 2007 at 02:33:37PM +0100, Jarek Buczy?ski wrote: > > su -s /bin/bash > > It doesn't work :( > > -------------------------- > $ su --shell=/bin/bash > Password: > Enter new UNIX password: > > -- > > $ cgrep root /etc/passwd > root:x:0:0:root:/root:/usr/bin/passwd > -------------------------- >
okay, *maybe* this will work. man su says it looks for the shell specified by --shell, then $SHELL if --preserve-environment is used, then the shell in /etc/passwd and finally /bin/sh. So what if you don't specify a shell, and can remove /usr/bin from your path. Its possible that if su can't find /usr/bin then it won't find /usr/bin/passwd and then it will drop to /bin/sh. It probably won't work, because i'll be its hardcoded to look in /usr/bin, but it might be worth a shot. A
signature.asc
Description: Digital signature