Bonjour,
J'ai un probl�me de config de profil de bash qui n'appara�t pas sous la
console mais sous tous les �mulateurs de terminaux X comme rxvt, xterm,
gterm, etc.
Le PATH devient bizarre :
echo $PATH
/usr/local/bin:/bin:/usr/bin::/usr/X11R6/bin:/usr/games:/home/alain/bin:/usr/games:/home/alain/bin:/usr/games:/home/alain/bin
Sous root, le path est normal.
J'ai r�ussi � corriger certains des probl�mes en modifiant les fichiers
suivants.
# /etc/bashrc
# System wide functions and aliases
# Environment stuff goes in /etc/profile
if [ -z "$PROFILE_LOADED" -a -e /etc/profile ]; then
. /etc/profile
fi
unset PROFILE_LOADED
PS1="[\u@\h \W]\\$ "
======= A quoi peut servir PROFILE_LOADED ? elle n'est pas export�e.
# /etc/profile
# (c) MandrakeSoft, Chmouel Boudjnah <[EMAIL PROTECTED]>
# System wide environment and startup programs
# Functions and aliases go in /etc/bashrc
PROFILE_LOADED=1
======== Variable non export�e !
##### Handle by Mandrake Security
#PATH="$PATH:/usr/X11R6/bin"
PS1="[\u@\h \W]\\$ "
# Users generally won't see annoyng core files
[ "$UID" = "0" ] && ulimit -c 1000000
##### Handle by Mandrake Security
#if [ `id -gn` = `id -un` -a `id -u` -gt 14 ]; then
# umask 002
#else
# umask 022
#fi
USER=`id -un`
LOGNAME=$USER
MAIL="/var/spool/mail/$USER"
HOSTNAME=`/bin/hostname`
HISTSIZE=1000
HISTFILESIZE=1000
INPUTRC=/etc/inputrc
export PS1 USER LOGNAME MAIL HOSTNAME HISTSIZE HISTFILESIZE INPUTRC
for i in /etc/profile.d/*.sh ; do
if [ -x $i ]; then
. $i
fi
done
unset i
# Mandrake-Security : if you remove this comment, remove the next line
too.
SECURE_LEVEL=3
# Mandrake-Security : if you remove this comment, remove the next line
too.
umask 022
# Mandrake-Security : if you remove this comment, remove the next line
too.
==============Ligne suivante modifi�e
echo $PATH|grep -q /usr/X11R6/bin || export
PATH=$PATH:/usr/X11R6/bin:/usr/games
# Mandrake-Security : if you remove this comment, remove the next line
too.
export SECURE_LEVEL
Suit ~/bash_profile.
# .bash_profile
extrait qui ne concerne que notre probl�me
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
export USERNAME BASH_ENV PATH
En utilisant ces fichiers modifi�s j'obtiens � la commande : echo $PATH
/usr/local/bin:/bin:/usr/bin::/usr/X11R6/bin:/usr/games:/home/alain/bin.
D'o� peut venir ce double :: ? il pose un probl�me de s�curit� car il
donne acc�s aux fichiers de commande du r�pertoire courant.
En effet, pour lancer ./monprogramme, je peux ne taper que monprogramme.
Dangereux (voir le guide du routard sous Linux).
Est-ce que ces probl�mes ont �t� corrig�s sous Mandrake 7.1 ?
Alain F.