Если компьютер один и на нём один общий аккаунт, то может быть проще:
; who is active
$ who
$ who -u
$ users
; last logins
$ last
$ last -a
; lock account
# usermod -L user
; unlock account
# usermod -U user
Ubuntu и Debian для продвинутых
Более 1000 незаменимых команд
стр.297, Изменение учетных записей пользователей
man usermod
man last | lastb
# apt-cache show shadow-change
Package: shadow-change
...
Filename: shadow-change-4.0.4.1-alt9.i586.rpm
Description: Utilities for changing user shell, finger and password information
This package includes utilities for changing user shell, finger and password
information:
+ chage: changes the number of days between password changes and the date of
the last password change;
+ chfn: changes user fullname, office number, office extension, and home phone
number information for a user's account;
+ chsh: changes the user login shell.