PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > linux.debian.user > #chsh -s /usr/bin/passwd - by misteke
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
linux.debian.user debian-user@lists.debian.org.

#chsh -s /usr/bin/passwd - by misteke

Réponse
 
LinkBack Outils de la discussion
Vieux 25/02/2007, 23h20   #1
Jarek Buczyñski
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut #chsh -s /usr/bin/passwd - by misteke

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


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
  Réponse avec citation
Vieux 25/02/2007, 23h40   #2
Joe Hart
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: #chsh -s /usr/bin/passwd - by misteke

-----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
  Réponse avec citation
Vieux 25/02/2007, 23h50   #3
Ron Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: #chsh -s /usr/bin/passwd - by misteke

-----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
  Réponse avec citation
Vieux 25/02/2007, 23h50   #4
Jarek Buczyñski
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: #chsh -s /usr/bin/passwd - by misteke

> 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
  Réponse avec citation
Vieux 26/02/2007, 01h10   #5
Atis
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: #chsh -s /usr/bin/passwd - by misteke

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
  Réponse avec citation
Vieux 26/02/2007, 13h40   #6
Jarek Buczyñski
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: #chsh -s /usr/bin/passwd - by misteke

> 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
  Réponse avec citation
Vieux 26/02/2007, 22h50   #7
Andrew Sackville-West
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: #chsh -s /usr/bin/passwd - by misteke

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-----

  Réponse avec citation
Vieux 27/02/2007, 00h30   #8
Jarek Buczyñski
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut RE: #chsh -s /usr/bin/passwd - by misteke

> 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
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 02h53.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,20660 seconds with 16 queries