|
|
|
|
||||||
| linux.debian.user debian-user@lists.debian.org. |
![]() |
|
|
LinkBack | Outils de la discussion |
|
|
#1 |
|
Messages: n/a
Hébergeur: |
Hi
I changed my user root shell to /usr/src/passwd, by mistake ![]() I forgot add user to command chsh #chsh -s /usr/bin/passwd I can't login as root is it possible change this without going tophysical machine and boot from LiveCD? I know root password, and other user who have default shell /bin/bash Please -- Best regards -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#2 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 Jarek Buczyñski wrote: > Hi > > I changed my user root shell to /usr/src/passwd, by mistake ![]() > > I forgot add user to command chsh > > #chsh -s /usr/bin/passwd > > I can't login as root is it possible change this without going to> physical machine and boot from LiveCD? > > I know root password, and other user who have default shell /bin/bash > > Please > > -- > Best regards > > Have you setup sudo? Can you perhaps do a sudo -i, or a sudo /bin/chch or some such shell? Joe -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFF4hwviXBCVWpc5J4RAmytAKCAI6w7/5Mqa+OrIPf3GqvbDuVInwCgxf4d YCHN/OLk4nWd5boUJeURTEw= =IWu9 -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#3 |
|
Messages: n/a
Hébergeur: |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1 On 02/25/07 17:21, Jarek Buczyñski wrote: > Hi > > I changed my user root shell to /usr/src/passwd, by mistake ![]() > > I forgot add user to command chsh > > #chsh -s /usr/bin/passwd > > I can't login as root is it possible change this without going to> physical machine and boot from LiveCD? > > I know root password, and other user who have default shell /bin/bash > > Please Boot from a Live CD and fix it from there. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF4h7KS9HxQb37XmcRAhGjAJwNIZwqh93idqb+Ippqb1 GMUiuMHgCgnnDI vgkYpE3rXjGVyA6o2duvFcw= =nlAE -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#4 |
|
Messages: n/a
Hébergeur: |
> Have you setup sudo? Can you perhaps do a sudo -i, or a sudo /bin/chch
> or some such shell? Unfortunately I haven't, yet ![]() >Boot from a Live CD and fix it from there. I know about this but it's remote machine, so I can't do this. -- Best regards -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#5 |
|
Messages: n/a
Hébergeur: |
On 2/26/07, Jarek Buczyñski <jaro80@gmail.com> wrote:
> Hi > > I changed my user root shell to /usr/src/passwd, by mistake ![]() > > I forgot add user to command chsh > > #chsh -s /usr/bin/passwd > > I can't login as root is it possible change this without going to> physical machine and boot from LiveCD? > > I know root password, and other user who have default shell /bin/bash su -s /bin/bash Regards, Atis |
|
|
|
#6 |
|
Messages: n/a
Hébergeur: |
> 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 -------------------------- -- Best regards -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
|
|
#7 |
|
Messages: n/a
Hébergeur: |
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 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF42L9aIeIEqwil4YRAsLCAJ9bliuCHzrjSEDQqlJYfc BcDy781wCdGthx XUmkXD1VZX3NCpLUrMnKoeA= =RwdP -----END PGP SIGNATURE----- |
|
|
|
#8 |
|
Messages: n/a
Hébergeur: |
> 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. Thanks but I don't understand what you mean, what should I do, and how, could you give me more detail (step by step ), please?-------------- $ echo $SHELL /bin/bash -------------- -- Best regards -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org |
|
![]() |
| Outils de la discussion | |
|
|