~/.bashrc 调用 /etc/bashrc 导致在deb10上root的PATH变得和普通用户一样,要改用 /etc/profile 才对。

This commit is contained in:
陆柯 2019-12-14 14:14:27 +08:00
parent 92666a6625
commit b7030522aa
2 changed files with 3 additions and 3 deletions

View File

@ -11,9 +11,9 @@
# User specific aliases and functions # User specific aliases and functions
# Execute system startup script: # Execute system startup script:
if [ -f /etc/bashrc ] if [ -f /etc/profile ]
then then
. /etc/bashrc . /etc/profile
fi fi
# Define primary prompt (default is '$'): # Define primary prompt (default is '$'):

View File

@ -5,7 +5,7 @@ if [ v$1 != v ]
then then
NewUser=$1 NewUser=$1
else else
read -p "Enter path-to-faronear " NewUser read -p "Enter new user name: " NewUser
fi fi
echo "<<< Add a new user" echo "<<< Add a new user"