1) edit the skeleton file
nano /etc/skel/.bashrc
2) Add customizations (We will apply default editor and a message it times user logged in)
add these content to /etc/skel/.bashrc
export EDITOR=/usr/bin/nano
echo "welecome $(whoami), all your activity on this system is monitored"
3) Apply changes
source /etc/skel/.bashrc
4) Test creating a new user
useradd kathy -m -c "guest account"
5) verify reading the content user's .bashrc file
cat /home/kathy/.bashrc
--------------------------------------------------------------
If you want customization for an existing user, edit the user .bashrc file, in this example we will do it with the user kathy
1) nano /home/kathy/.bashrc
2) add changes
export EDITOR=/usr/bin/vi
echo "Hello dear $(whoami)"
3) save it
source /home/kathy/.bashrc
No hay comentarios:
Publicar un comentario