Lock an User temperarily


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Lock an User temperarily
# 1  
Old 08-24-2001
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
# 2  
Old 08-24-2001
in the /etc/shadow file put an "!" point in front of the password. this should lock the passwd. it will not be accessable to other users as that user can no longer log in untill the "!" is removed.
# 3  
Old 08-24-2001
Thanks a lot,

What about root user? can root log in to it?

thanks
Bhupal
# 4  
Old 08-24-2001
dont know. havent tried. but i am sure he should be able to.
# 5  
Old 08-24-2001
Yes root can become a locked user.
Code:
# su - locked_user

To lock the user, change this
user:97zBUdZjV5J7Y:15028::::::

to
user:*97zBUdZjV5J7Y:15028::::::

You can also add this message to the top of the .profile file in the users home directory
Code:
echo "You account is locked, contact your system administator"; exit

# 6  
Old 08-27-2001
Thanks a lot! worked well

reddyb
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How to Lock the Script?

Hi All, Seeking for your assistance on how to lock the script if it's running? meaning anybody can't run my script while it's running. Please advise, Thanks, (8 Replies)
Discussion started by: nikki1200
8 Replies

2. Shell Programming and Scripting

lock on files

Hi, I want to write a code where in the file once taken genrates a lock number and other developer/user cannot take the file to make any changes in it. He gets the file only as read only. (2 Replies)
Discussion started by: rac
2 Replies

3. 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

4. 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

5. UNIX for Advanced & Expert Users

file lock

I have an Essbase installation on Solaris 10 and need to get the backups configured. Unfortunately several key files are locked and Essbase (OLAP application) is not releasing the locks when the Essbase or the applications within stop running. It appears I can use chmod to unlock the files but I... (0 Replies)
Discussion started by: JavaBrian
0 Replies

6. 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

7. Linux

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? ... (5 Replies)
Discussion started by: harjitsingh
5 Replies

8. 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

9. HP-UX

How to Lock In HP-UX

Hi , How should i implemet a lock function Hp-ux . I want to a lock a file through fcntl in Hp-ux . But is not locking properly . Thanks Narendra (7 Replies)
Discussion started by: naren_chella
7 Replies

10. 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
Login or Register to Ask a Question