- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: disable /enable users.
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 06:55 PM
02-08-2006 06:55 PM
1. How do i disable a user with command line ?
2. How do i verify it by command?
3. How do i enable it back ?
BYE
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 07:05 PM
02-08-2006 07:05 PM
Re: disable /enable users.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 07:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 07:07 PM
02-08-2006 07:07 PM
Re: disable /enable users.
Hi,
To disable a user
#passwd -l
Do,
#passwd
and assign a passwrod to enable it back
With Regards,
Siva.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 07:29 PM
02-08-2006 07:29 PM
Re: disable /enable users.
1. How do i disable a user with command line ?
# passwd -l
2. How do i verify it by command?
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=726139
3. How do i enable it back ?
# passwd
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 08:04 PM
02-08-2006 08:04 PM
Re: disable /enable users.
Disable/Lock a user account
# passwd -l loginid
To unlock/enable a user's account that has become disabled
#modprpw -k loginid
Rgds,
Ajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 08:18 PM
02-08-2006 08:18 PM
Re: disable /enable users.
My system is in trusted mode , is it make difference ?
BYE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 08:35 PM
02-08-2006 08:35 PM
Re: disable /enable users.
In case of trusted mode, you can follow these steps,
# /usr/lbin/modprpw -k uname
For other queries, use this thread,
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=955231
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 08:59 PM
02-08-2006 08:59 PM
Re: disable /enable users.
1) passwd -l
2) Login with that user from terminal or passwd -s
3) passwd -d
Trusted Mode:
1) modprpw alock=YES
2) getprpw -a
3) modprpw -k
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 09:01 PM
02-08-2006 09:01 PM
Re: disable /enable users.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 09:03 PM
02-08-2006 09:03 PM
Re: disable /enable users.
Thanks to Bharat ;)
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 09:53 PM
02-08-2006 09:53 PM
Re: disable /enable users.
Kasper ,
how do i get lockout parameter from getprpw ??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 09:59 PM
02-08-2006 09:59 PM
Re: disable /enable users.
man getprpw
This one works with trusted systems. If your system is not trusted, it may not be useful for you.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-08-2006 09:59 PM
02-08-2006 09:59 PM
Re: disable /enable users.
# /usr/lbin/getprpw -lrm lockout username
Take a look at # man getprpw.
lockout returns the reason for a lockout in a "bit" valued
string, where 0 = condition not present, 1 is
present. The position, left to right represents:
1 past password lifetime
2 past last login time (inactive account)
3 past absolute account lifetime
4 exceeded unsuccessful login attempts
5 password required and a null password
6 admin lock
7 password is a *
-Arun
P.S Remember to assign points.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 01:57 AM
02-09-2006 01:57 AM
Re: disable /enable users.
echo "THE USERS BELOW LOCKED:\r"
for USER in $(listusers | awk '{print $1}'|egrep -v "sshd|smbnull|tools|tbase")
do
lock_pos=$(/usr/lbin/getprpw -r -m lockout $USER)
user_name=$(grep $USER /etc/passwd|awk -F: '{print $5}')
if [ $lock_pos != "0000000" ]
then
echo "$USER $user_name $lock_pos"
fi
done
#end script
#man getprpw
lockout returns the reason for a lockout in a "bit" valued
string, where 0 = condition not present, 1 is
present. The position, left to right represents:
1 past password lifetime
2 past last login time (inactive account)
3 past absolute account lifetime
4 exceeded unsuccessful login attempts
5 password required and a null password
6 admin lock
7 password is a *
Good Luck,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2006 01:59 AM
02-09-2006 01:59 AM
Re: disable /enable users.
"unlock" users who are locked!!!
:-))
Good Luck,