07-21-2010
As root you can type
passwd -L <username>
If you want to active again, as root
passwd -u <username>
Regards
Jiman
10 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
hi
how to disable the useraccount in aix (should not remove). (1 Reply)
Discussion started by: chomca
1 Replies
2. HP-UX
example
root::0:3::/:/sbin/sh
daemon:*:1:5::/:/sbin/sh
bin:*:2:2::/usr/bin:/sbin/sh
sys:*:3:3::/:
adm:*:4:4::/var/adm:/sbin/sh
uucp:*:5:3::/var/spool/uucppublic:/usr/lbin/uucp/uucico
lp:*:9:7::/var/spool/lp:/sbin/sh
nuucp:*:11:11::/var/spool/uucppublic:/usr/lbin/uucp/uucico... (1 Reply)
Discussion started by: alert0919
1 Replies
3. UNIX for Dummies Questions & Answers
Thanks
AVKlinux (3 Replies)
Discussion started by: avklinux
3 Replies
4. Solaris
My admin has set password policy to de-activate user account if there is not login for 90 days. How can i re-activate user account w/o deleting, or changing user password.
Thanks in advance
Deeps (6 Replies)
Discussion started by: admin@solaris
6 Replies
5. Red Hat
Hi,
I have to move user account from solaris to Linux environment because I don't want user to create password again in Linux environment, so could somebody confirm me how to do it, I know there are files /etc/groups, /etc/passwd and /etc/shadows need to copy but somebody confirm me what is the... (2 Replies)
Discussion started by: mnaumanca
2 Replies
6. UNIX for Advanced & Expert Users
Hi,
I need to deactivate a user account for some time and then reactivate the user account ...
Can anybody please help me how to do this.....
I don't have root privileges but i have sudo to privileges.
Thanks....
Thread closed. Double post. Continued here. (0 Replies)
Discussion started by: firestar
0 Replies
7. Solaris
Hi
I need to create a new user account in salaries. Can anyone tell me the cmd to create the new user acc. But the main thing is it should same permissions ,same group etc of already existing group.
For example we have already one user in name “comp” so the newly created user should also have... (3 Replies)
Discussion started by: kkalyan
3 Replies
8. Linux
Hi,
i have the following config in the system-auth files
auth required /lib/security/$ISA/pam_env.so
auth sufficient /lib/security/$ISA/pam_unix.so likeauth nullok
auth required /lib/security/$ISA/pam_deny.so
account required ... (2 Replies)
Discussion started by: yprudent
2 Replies
9. HP-UX
I need to check actual date a user was disabled on my HP-UX server.
Audit is claiming the user account was active during the last audit exercise. (7 Replies)
Discussion started by: cyriac_N
7 Replies
10. Solaris
Hi everyone
Please i need urgent help...
I have installed solaris 11 using live media.. then i installed sunray.. every thing is fine.. but after system reboot i am unable to login on server on GUI it gives account expired error or some time authentication failed... but i can log in through... (11 Replies)
Discussion started by: amk
11 Replies
LEARN ABOUT NETBSD
pw_lock
PW_LOCK(3) BSD Library Functions Manual PW_LOCK(3)
NAME
pw_lock, pw_mkdb, pw_abort, pw_setprefix, pw_getprefix -- passwd file update functions
LIBRARY
System Utilities Library (libutil, -lutil)
SYNOPSIS
#include <util.h>
int
pw_lock(int retries);
int
pw_mkdb(const char *username, int secureonly);
void
pw_abort(void);
int
pw_setprefix(const char *new_prefix);
const char *
pw_getprefix(void);
DESCRIPTION
The pw_lock(), pw_mkdb(), and pw_abort() functions allow a program to update the system passwd database.
The pw_lock() function attempts to lock the passwd database by creating the file /etc/ptmp, and returns the file descriptor of that file. If
retries is greater than zero, pw_lock() will try multiple times to open /etc/ptmp, waiting one second between tries. In addition to being a
lock file, /etc/ptmp will also hold the contents of the new passwd file.
The pw_mkdb() function updates the passwd file from the contents of /etc/ptmp. You should finish writing to and close the file descriptor
returned by pw_lock() before calling pw_mkdb(). If pw_mkdb() fails and you do not wish to retry, you should make sure to call pw_abort() to
clean up the lock file. If the username argument is not NULL, only database entries pertaining to the specified user will be modified. If
the secureonly argument is non-zero, only the secure database will be updated.
The pw_abort() function aborts a passwd file update by deleting /etc/ptmp. The passwd database remains unchanged.
The pw_setprefix() function defines the root directory used for passwd file updates. If the prefix is set to /newroot pw_lock() will operate
on /newroot/etc/ptmp afterwards. The default prefix is an empty string.
The pw_getprefix() function returns the root directory which is currently used for passwd file updates.
RETURN VALUES
The pw_lock() and pw_mkdb() functions return -1 if they are unable to complete properly.
FILES
/etc/master.passwd
/etc/ptmp
SEE ALSO
pw_init(3), pwd_mkdb(8)
BSD
February 17, 2007 BSD