The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > OS Specific Forums > Linux
Google UNIX.COM


Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Normal User Unable to Login Through AIX CDE ranadeep AIX 1 03-07-2008 03:05 AM
lock user to directory in ftp eliraza6 SUN Solaris 3 10-25-2007 02:56 AM
groupadd: unable to lock group file Daven81 Linux 1 11-14-2005 07:28 AM
Other than root user .Normal user is unable to create files mallesh UNIX for Advanced & Expert Users 1 06-22-2005 09:18 AM
Lock an User temperarily reddyb UNIX for Dummies Questions & Answers 5 08-27-2001 06:52 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 06-05-2008
Registered User
 

Join Date: May 2008
Posts: 12
Unable to Lock User

Hi,

I am trying to lock a user by executing "passwd -l xxxx" but the system is returning following error:

Locking password for user xxxx.
passwd: Error (password not set?)

I do see the passwd for this user encrypted in shadow file thou! Anyone have any ideas why am getting this error?

Help is appreciated greatly!!
Reply With Quote
Forum Sponsor
  #2  
Old 06-05-2008
Registered User
 

Join Date: Apr 2008
Location: European Union/Germany
Posts: 183
To have some more information would be helpful.
Code:
ls -ld /etc/passwd /etc/shadow
grep $user /etc/passwd /etc/shadow
Reply With Quote
  #3  
Old 06-05-2008
Registered User
 

Join Date: May 2008
Posts: 12
Manually hacked the shadow file

fabtagon....thanks for your quick reply. I had to manually hack the shadow file to lock the user.
The user exists in passwd and shadwo file but am not sure why it gave me an error on passwd -l xxxx. It was kind of urgent but I took care of it the hard way. I still wonder why my command failed.

I appreciate your help and quick response.
Reply With Quote
  #4  
Old 06-05-2008
Registered User
 

Join Date: May 2008
Location: s'pore
Posts: 918
whats the output of passwd -sa
did u try: passwd xxxx ->chg password
then followed by passwd -l xxx
Reply With Quote
  #5  
Old 06-06-2008
Registered User
 

Join Date: May 2008
Posts: 77
Another option would be to remove the user from the shadow file and run pwconv
Reply With Quote
  #6  
Old 06-06-2008
Registered User
 

Join Date: May 2008
Posts: 12
I used traditional method i.e put * alongwith password in shadow file. It took care of my problem. I just tried littl harder not smarter this time. I don't know why "passwd -l xxx" didn't work. May be it has something to do with NIS! I don't know
But I appreciate you everyone who have came to my rescue with vaulable ideas.
As always you guys/gals ROCK!!
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 11:00 AM.


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

Content Relevant URLs by vBSEO 3.2.0