Le 12.09.03, Arnaud CALVO a tapot� :

|
| On Fri, 12 Sep 2003, Thomas Nemeth wrote:
|
| > Le 12.09.03, Arnaud CALVO a tapot� :
| > | D'o� la question (maintenant, je sais que bash est activ�, mais alors
| > | pourquoi en tapant 'bash', l'alias 'll' est activ� alors qu'avant, non) ?
| >
| >     Parceque ton alias ll n'est pas charg� avec su - ?
|
| Pourquoi ?

        Parceque "su -" lance un login-shell.
        Extrait de man su :

OPTIONS
       -      make this a login shell



| >     Tu l'as mis dans un fichier s�par� qui n'est pas ouvert avec ce
| >     type de login : quand tu tapes bash, tu ne lances pas un
| >     'login-shell', mais un shell normal.
|
| Je l'ai mis dans /etc/bash.bashrc
| Donc mon probl�me vient de la diff�rence "login-shell" <> "shell" ? Je me
| renseigne l�-dessus...

        Voil�. Extrait de man bash :

INVOCATION
       A  login  shell  is  one whose first character of argument
       zero is a -, or one started with the --login option.

       An interactive shell is one whose standard input and  out�
       put  are  both  connected  to  terminals (as determined by
       isatty(3)), or one started with the -i option.  PS1 is set
       and $- includes i if bash is interactive, allowing a shell
       script or a startup file to test this state.
[...]
       When bash is invoked as an interactive login shell, or  as
       a  non-interactive shell with the --login option, it first
       reads and executes commands from the file /etc/profile, if
       that  file  exists.  After reading that file, it looks for
       ~/.bash_profile, ~/.bash_login, and  ~/.profile,  in  that
       order,  and reads and executes commands from the first one
       that exists and is readable.  The --noprofile  option  may
       be  used  when the shell is started to inhibit this behav�
       ior.
[...]
       When  an  interactive  shell  that is not a login shell is
       started, bash reads and executes commands from  ~/.bashrc,
       if  that  file exists.  This may be inhibited by using the
       --norc option.  The --rcfile file option will  force  bash
       to   read  and  execute  commands  from  file  instead  of
       ~/.bashrc.



| > | > | - je dois taper le mot de passe (alors que j'ai enlev� la croix dans
| > | > | /etc/passwd, et enlev� le mdp chiffr� dans les 3 fichiers /etc/shadow*
| > | >
| > | >         Gni ???
| > | >         Le x dans /etc/passwd signifie que le syst�me d'identification
| > | >         utilise les shadow passwords (dans /etc/shadow).
| > |
| > | Oui mais je veux le d�sactiver, et passwd ne me permet pas d'entrer un mot
| > | de passe vide.
| >
| >     C'est, comme je te le disais, /etc/shadow qu'il faut modifier.
|
| J'avais fait les 2 ! J'ai enlev� le pass chiffr� dans la 2�me colonne des
| 3 fichiers /etc/shadow /etc/shadow- et /etc/shadow.org, et j'ai essay�
| avec ou sans le "x" dans la 2�me colonne de /etc/passwd.

        De toutes fa�ons ce _n'est pas_ une bonne id�e de mettre un compte
        sans mot de passe...


Thomas
-- 
THE GOOD HUMOR MAN CAN ONLY BE PUSHED SO FAR
THE GOOD HUMOR MAN CAN ONLY BE PUSHED SO FAR
THE GOOD HUMOR MAN CAN ONLY BE PUSHED SO FAR
-+- Bart Simpson on chalkboard in episode 2F18

Répondre à