Re: mode single et shell root
* Yves Rutschle <debian.anti-spam@rutschle.net> [2004-05-25 16:55] :
> On Tue, May 25, 2004 at 05:02:17PM +0200, Georges Mariano wrote:
> > En fait, je voulais démarrer en root avec le minimum de montage (en fait
> > sans monter /usr). Or je m'aperçois qu'il n'est pas possible de démonter
> > /usr après un démarrage single pour une raison assez "bête", le shell
> > root c'est bash et bash est dans /usr...
> >
> > Je me dis que c'est dommage, avec un shell root à sash ça passait ...
> >
> > Mon intuition de la chose est elle correcte ? J'irais (prudemment)
> > jusqu'à dire que c'est dommage mais ... ? pourquoi pas définir sash
> > comme shell root par défaut ? quels problèmes en perspective ?
> >
> > des avis ?
>
> Oui: ce qui est bizarre, c'est ta Debian en particulier :-)
>
> Chez moi:
> [yves@oban]:yves$ which bash
> /bin/bash
> [yves@oban]:yves$ head -n 1 /etc/passwd
> root:x:0:0:root:/root:/bin/bash
> [yves@oban]:yves$ dpkg -L bash
> /.
> /bin
> /bin/bash
> [...]
>
> et ldd /bin/bash montre que toutes les libs sont dans /lib
> (pas /usr/lib). Donc ça aurait du marcher...
Pas nécessairement, si tu fais un :
# lsof | grep bash
[...]
bash 29365 fred rtd DIR 3,5 1024 2 /
bash 29365 fred txt REG 3,5 511400 51254 /bin/bash
bash 29365 fred mem REG 3,5 90210 24735 /lib/ld-2.2.5.so
bash 29365 fred mem REG 3,8 436 328727 /usr/lib/locale/fr_FR@euro/LC_IDENTIFICATION
bash 29365 fred mem REG 3,8 29 328726 /usr/lib/locale/fr_FR@euro/LC_MEASUREMENT
bash 29365 fred mem REG 3,8 60 328725 /usr/lib/locale/fr_FR@euro/LC_TELEPHONE
bash 29365 fred mem REG 3,8 133 328724 /usr/lib/locale/fr_FR@euro/LC_ADDRESS
bash 29365 fred mem REG 3,8 68 328723 /usr/lib/locale/fr_FR@euro/LC_NAME
bash 29365 fred mem REG 3,8 40 328722 /usr/lib/locale/fr_FR@euro/LC_PAPER
bash 29365 fred mem REG 3,8 60 278668 /usr/lib/locale/fr_FR@euro/LC_MESSAGES/SYS_LC_MESSAGES
bash 29365 fred mem REG 3,8 292 328296 /usr/lib/locale/fr_FR@euro/LC_MONETARY
bash 29365 fred mem REG 3,5 248132 24703 /lib/libncurses.so.5.2
bash 29365 fred mem REG 3,5 8008 24741 /lib/libdl-2.2.5.so
bash 29365 fred mem REG 3,5 1153784 24738 /lib/libc-2.2.5.so
bash 29365 fred mem REG 3,8 22592 328295 /usr/lib/locale/fr_FR@euro/LC_COLLATE
bash 29365 fred mem REG 3,8 2353 328294 /usr/lib/locale/fr_FR@euro/LC_TIME
bash 29365 fred mem REG 3,8 60 328293 /usr/lib/locale/fr_FR@euro/LC_NUMERIC
bash 29365 fred mem REG 3,8 201884 328292 /usr/lib/locale/fr_FR@euro/LC_CTYPE
bash 29365 fred mem REG 3,5 40152 24745 /lib/libnss_compat-2.2.5.so
bash 29365 fred mem REG 3,5 69472 24743 /lib/libnsl-2.2.5.so
(avec root au lieu de fred, ça fait la même chose)
/usr est donc bloqué par bash à cause des locales. L'astuce consiste
alors à désactiver les locales avant de se connecter en tant que root.
Fred
--
Comment poser les questions de manière intelligente ?
http://www.gnurou.org/documents/smart-questions-fr.html
Comment signaler efficacement un bug ?
http://www.chiark.greenend.org.uk/~sgtatham/bugs-fr.html
Reply to: