Unable to Lock User


 
Thread Tools Search this Thread
Operating Systems Linux Unable to Lock User
# 1  
Old 06-05-2008
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!!
# 2  
Old 06-05-2008
To have some more information would be helpful.
Code:
ls -ld /etc/passwd /etc/shadow
grep $user /etc/passwd /etc/shadow

# 3  
Old 06-05-2008
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.
# 4  
Old 06-05-2008
whats the output of passwd -sa
did u try: passwd xxxx ->chg password
then followed by passwd -l xxx
# 5  
Old 06-06-2008
Another option would be to remove the user from the shadow file and run pwconv
# 6  
Old 06-06-2008
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!!
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Unable to obtain lock on NFS files

Hello , I am creating a controlfile of database in linux and below is the error coming: SQL> CREATE CONTROLFILE REUSE set DATABASE "newdbcln" RESETLOGS NOARCHIVELOG 2 MAXLOGFILES 5 3 MAXLOGMEMBERS 5 MAXDATAFILES 100 4 5 MAXINSTANCES 1 6 MAXLOGHISTORY... (2 Replies)
Discussion started by: admin_db
2 Replies

2. UNIX for Advanced & Expert Users

Testing privileges -lock lockfile /var/lock/subsys/..- Permission denied

Hi all, I have to test some user priviliges. The goal is to be sure that an unauthorized user can't restart some modules (ssh, mysql etc...). I'm trying to automate it with a shell script but in same cases I got the syslog broadcast message. Is there any way to simply get a return code... (3 Replies)
Discussion started by: Dedalus
3 Replies

3. Red Hat

Security Question: Lock after invalid login, Session Lock and Required Minimum Password Length

Hello all, If anyone has time, I have a few questions: How do I do the following in Linux. We are using Red Hat and Oracle Enterprise Linux, which is based on Red Hat too. 1. How to lock the account after a few (like 3) invalid password attempts? 2. How do you lock a screen after 30... (1 Reply)
Discussion started by: nstarz
1 Replies

4. Linux

Lock User in home directory in ftp prompt

Hi, I am using Red Hat Enterprise Linux ES release 4 (Nahant Update 5). Here I have created one user with /sbin/nologin shll such that login is not possible only ftp is possible. But I want to do another thing that the user can not roam around after ftp. I had tried one way. in... (4 Replies)
Discussion started by: kallol
4 Replies

5. Solaris

Unable to release package administration lock for this system

Hi, I created a Solaris package, but at the end of installation (on a Solaris 10 sparc) I get : #pkgadd -d MyApp_version__SunOS_sparc.pkg ... Installation of <MyAppName> was successful. pkgadd: ERROR: ERROR: Unable to release package administration lock for this system; try again later... (0 Replies)
Discussion started by: potro
0 Replies

6. Solaris

lock user to directory in ftp

how can i lock a specific user to his home directory when he logs on to the computer with ftp? thanx! (3 Replies)
Discussion started by: eliraza6
3 Replies

7. Linux

groupadd: unable to lock group file

Hi guys, i encountered this error when i try to create a group. What is the problem here? I created a few groups weeks before this. I was recommended to reboot the machine, but i am not the owner of the machine, thus i would prefer to know the cause and any other solution other than rebooting the... (1 Reply)
Discussion started by: Daven81
1 Replies

8. UNIX for Advanced & Expert Users

Other than root user .Normal user is unable to create files

Hi all, I am using Sun Solaris 9 .In this system normal users unable to create files from the command line.I added these users in bin,adm and even root group i found them unable to create a file. (1 Reply)
Discussion started by: mallesh
1 Replies

9. UNIX for Dummies Questions & Answers

how to lock keyboard without using lock command

how can I lock my keyboard while I'm away from the computer without using lock command. What other commands gives me the option to lock keyboard device? thanks (7 Replies)
Discussion started by: dianayun
7 Replies

10. UNIX for Dummies Questions & Answers

Lock an User temperarily

Hi all, How can I lock an User account temperarily? but this account should be accessable to other users through sudo? quick help is highly appriciated thanks reddy (5 Replies)
Discussion started by: reddyb
5 Replies
Login or Register to Ask a Question