The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

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 03:49 AM
how to block a user temporarily? winky AIX 3 06-19-2007 10:27 AM
Want to block ftp for root user jumadhiya SUN Solaris 3 02-07-2007 05:01 AM
block certain domain from sending mail to server legato UNIX for Dummies Questions & Answers 2 10-01-2006 09:43 PM
smitty, remove user, remove directory as well.. yls177 UNIX for Dummies Questions & Answers 2 11-11-2002 02:43 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 06-30-2008
sureshcisco sureshcisco is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 19
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 09:30 PM..
  #2 (permalink)  
Old 07-01-2008
Smiling Dragon's Avatar
Smiling Dragon Smiling Dragon is offline Forum Advisor  
Disorganised User
  
 

Join Date: Nov 2007
Location: New Zealand
Posts: 922
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.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 08:06 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0