Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-09-2009, 01:49 AM   #1
LQ Newbie
Registered: Aug 2009
Posts: 1

Rep: Reputation: 0
Thumbs up How to disable a user

How to disable a user
Old 08-09-2009, 01:55 AM   #2
LQ Guru
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 357Reputation: 357Reputation: 357Reputation: 357
Do you want to just disable the user, or completely delete the account from the system?

To simply lock a user out, you could use "usermod -L username", to reverse this you would use "usermod -U username".

If you wanted to delete just the user's login information you would do "userdel username", and if you wanted to remove the user and their /home directory (all of their personal files and directories), you would use "userdel -r username".
Old 08-09-2009, 01:59 AM   #3
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
There's probably a few ways to do it, I personally prefer a command line approach. On my system I can deactivate an account like this:

usermod -L <username>

And reactivate with -U

usermod -U <username>

I hope this helps


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable Right Click button for user jaredhanks Red Hat 5 11-23-2010 12:03 AM
Disable net access for one user Dawgmatix Linux - Networking 5 02-05-2005 10:25 AM
how can i get ip from icq ..if the user disable the see ip SlackwareMan Linux - Security 2 08-19-2004 05:45 AM
How can you disable the user preferences in Netscape 7.1? ritzguy24 Linux - Software 0 07-01-2004 11:17 AM
disable user login ust Linux - General 2 04-01-2004 12:06 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration