This command handles a script launched at user login/logout process tracked by the utlogd daemon.
utlogctl [ -h ] [ -v verbosity ] [ -n ] [ -s ] [ -d ] [ -l ] user|login|logout|skelin|skelout username scriptname
Activate/deactivate a user or a user's scripts which will be launched at user login/logout process tracked by the utlogd daemon. By default, a series of scripts present at /var/lib/utlogd/.skel/log{in,out}
(A.K.A skeleton scripts) directories are automatically copied to the corresponding /var/lib/utlogd/<username>/log{in,out}
directories at activation process.
To do the reverse of the following actions, use the -d option.
In case of login, logout, skelin and skelout action, scriptname must be an absolute path. At contrary, if the -d option is used to deactivate a script, the path of the scriptname must be forgotten.
In case of skelin and skelout action, the argument username is replaced by the argument scriptname.
user : activate the user's username.
login : activate the user's script scriptname for the user's username at /var/lib/utlogd/<username>/login
directory.
logout : activate the user's script scriptname for the user's username at /var/lib/utlogd/<username>/logout
directory.
skelin : activate the script scriptname at /var/lib/utlogd/.skel/login
directory.
skelout : activate the script scriptname at /var/lib/utlogd/.skel/logout
directory.
-h : prints this help.
-v verbosity : increases/decreases the verbosity of the command.
-n : do not copy the skeleton files. This option only effects username activation. The corresponding /var/lib/utlogd/<username>/log{in,out}
is created but left empty.
-s : creates a symlink pointing to scriptname at the corresponding login,logout,skelin,skelout
directories instead of making a copy of the scriptname.
-d : deactivates a user, a user's script or a skeleton script. In case of user
actions, the corresponding /var/lib/utlogd/<username>/
is removed.
-l : lists the contents of the corresponding login,logout,skelin,skelout
directories depending on the actions passed. If the user
action is passed, it lists the /var/lib/utlogd/<username>/log{in,out}
user directories.
To optimize the memory resources used by the utlogd daemon, some limitations are applied:
By default, the skeleton files and directories are empty. It's the responsibility of the system administrator to provide it.
Activate a user:
utlogctl user oblive
Deactivate a user:
utlogctl -d user oblive
Activate a user without copying the contents of the skeleton directory:
utlogctl -n user oblive
Activate a script for a user login time:
utlogctl login oblive /home/oblive/my_script.sh
Deactivate a script for a user login time:
utlogctl -d login oblive my_script.sh
Activate a script for a user login time creating a symlink at the /var/lib/utlogd/login/
directory pointing to the location of the script instead of making a copy:
utlogctl -s login oblive /home/oblive/my_script.sh
Activate a new skeleton script for the logout time:
utlogctl skelout /usr/share/utlogd/new_script.sh
Deactivate a skeleton script for the logout time:
utlogctl -d skelout new_script.sh
List the script activated for a user:
utlogctl -l user obarun
List the script activated at the logout directory for a user:
utlogctl -l logout obarun
List the skeleton script activated for the login time:
utlogctl -l skelin