From the beginning, I am not an exercised admin for linux but I have to take on this function in my new job. First I want to delete the account of my perdecessor, but he is still logged in. So here are two questions:
1) how can I loggof the user
2) how can I set an account inactive, I think this is a better way, than to delete the account at the moment.
thanks for help
Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230
delete a user when the user is logged in
To disable the account , type (as root or using sudo):
This locks the account. Type:
For more information on how this locks the account. To activate the account you need to unlock it (as root):
which the manpage shows how to do as well.[/quote]
Code: Select all
passwd -l username
Code: Select all
man passwd
Code: Select all
passwd -u username
Joseph Smidt
Everybody should contribute to so beautiful of a cause as the Debian Project.
Everybody should contribute to so beautiful of a cause as the Debian Project.
-
- Debian Developer, Site Admin
- Posts: 483
- Joined: 2004-04-06 18:19
- Location: Utrecht, NL
- Contact:
You can logout the user by killing his processes. Type "ps -u username" to see what they are, and whether you think you could safely kill them.
It is normally polite to ask the user whether there's till some mail or data that the user wants to retain and provide a way to get at it.
Just locking the account might not lock everything of it, ssh keybased might still work (not sure), commands started by incoming mail from procmail, cronjobs, atjobs, and other ways.
It is normally polite to ask the user whether there's till some mail or data that the user wants to retain and provide a way to get at it.
Just locking the account might not lock everything of it, ssh keybased might still work (not sure), commands started by incoming mail from procmail, cronjobs, atjobs, and other ways.