The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
Google UNIX.COM


UNIX for Advanced & Expert Users Advanced UNIX and Linux questions go here. Expert-to-Expert.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
How to block an anonymous ftp user? dennisheazle UNIX for Dummies Questions & Answers 10 04-17-2008 12:49 AM
how to block a user temporarily? winky AIX 3 06-19-2007 07:27 AM
Want to block ftp for root user jumadhiya SUN Solaris 3 02-07-2007 01:01 AM
block certain domain from sending mail to server legato UNIX for Dummies Questions & Answers 2 10-01-2006 06:43 PM
smitty, remove user, remove directory as well.. yls177 UNIX for Dummies Questions & Answers 2 11-10-2002 10:43 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-30-2008
Registered User
 

Join Date: Jun 2008
Posts: 7
Stumble this Post!
Remove and block a user from Linux server

Hi,

Can anyone please guide me how can I remove/block a user from a server access.

/usr/sbin/adduser -d /home/john john
echo ****** | passwd --stdin john

I used the above command to add a user "john". How do I delete and block john.

Appreciate your responses.

Last edited by sureshcisco; 06-30-2008 at 06:30 PM.
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 07-01-2008
Smiling Dragon's Avatar
Disorganised User
 
Join Date: Nov 2007
Location: New Zealand
Posts: 709
Stumble this Post!
Quote:
Originally Posted by sureshcisco View Post
I used the above command to add a user "john". How do I delete and block john.
On many systems:
Code:
userdel john
If you want to remove the homedir also, use the -r flag.
Alternativly, to just block access without removing the account, edit /etc/shadow and change the password to *LK* to lock the account.
If userdel isn't available, you can manually remove the entires from /etc/passwd and /etc/shadow. Then just check /etc/group and remove their name, and delete their home directory.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 12:31 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0