nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

Locking account on redhat using /etc/passwd

This is a discussion on Locking account on redhat using /etc/passwd within the Linux software forums, part of the Linux Getting Started category; How do I lock account on redhat Linux w/o deleting a user account? What modification do I need to make ...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 07-27-2007, 07:45 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
My distro: Suse, RHEL, Vista
Posts: 154
Rep Power: 4
sweta will become famous soon enough
Default Locking account on redhat using /etc/passwd

How do I lock account on redhat Linux w/o deleting a user account? What modification do I need to make to /etc/passwd file?
__________________
Friends - v-nessa - missyAdmin - LinuxChix
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-02-2007, 11:32 AM
Junior Member
User
 
Join Date: Jul 2007
My distro: Redhat
Posts: 8
Rep Power: 0
piggy is on a distinguished road
Default

passwd -l <username>
Reply With Quote
  #3 (permalink)  
Old 08-03-2007, 09:59 PM
Member
User
 
Join Date: May 2007
Posts: 56
Rep Power: 2
lacloai is on a distinguished road
Default

You can do like vi /etc/passwd and find the account that you want to lock it and put plus sign (+) in front of it. Save it and you're good to go. By doing that, the user account tomctl got disable and can't login anymore but his account is still in your machine. If you want to complete remove it, then do userdel -r tomctl. Also, you can do the rbash to restrict that user, too. Tons of things we can manage users in linux.

For example.

+tomctl:102............... /home/tomctl:/bin/bash
This will disable tomctl account.
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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

Similar Threads

Thread Thread Starter Forum Replies Last Post
Linux NFS file locking soft or hard method vaibhav.kanchan Getting started tutorials 2 05-13-2008 06:00 PM
Passwd bubloob_13 Getting started tutorials 2 03-24-2008 11:04 PM
passwd reset pansarevai CentOS / RHEL / Fedora 4 03-24-2008 10:39 PM
Redhat Users vsftpd FTP Passwd Reset Problem bubloob_13 CentOS / RHEL / Fedora 1 11-05-2007 09:03 PM
Ssh account locking Linux software 1 01-11-2006 12:28 AM


All times are GMT +5.5. The time now is 03:14 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36