User Tools

Site Tools


linux:user_profile

This is an old revision of the document!


User profile / history

[root@linux01] /etc # cat /etc/profile.d/login.sh trap 1 2 3 export TMOUT=1800 readonly TMOUT if [ “\$EUID” = “0” ]; then

      export PATH=/bin:/usr/bin:/sbin:/usr/sbin

fi umask 027 tty -s && mesg n

### SECONDARY LOGGING FROM=$(/usr/bin/who am i 2>/dev/null | awk '{print $1}') TO=$(/usr/bin/whoami | awk '{print $1}') FILE=“${FROM}_${TO}” # Create dir if it doesn't exist. if ! -d /var/adm/history; then

mkdir -p /var/adm/history
chmod 1777 /var/adm/history

fi HISTFILE=/var/adm/history/sh_history.${FILE} EXTENDED_HISTORY=ON HISTSIZE=10000 HISTDATEFMT=%d-%m-%y.%H:%M:%S HISTTIMEFORMAT=“%F %T ” # Store Bash History Immediately. PROMPT_COMMAND='history -a' # Ignore Specific Commands. HISTIGNORE=“history:ls:pwd:#*:ll:” export HISTFILE EXTENDED_HISTORY HISTSIZE HISTDATEFMT HISTTIMEFORMAT </cli>

linux/user_profile.1716544216.txt.gz · Last modified: 2024/05/24 11:50 by manu