- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- HP/UX 11.11 Restricted access for maintenance?
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
Discussions
Discussions
Forums
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
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
тАО10-19-2010 11:06 AM
тАО10-19-2010 11:06 AM
Is there a good way in the /etc/profile to keep all but users root, user1, user2 and informix from getting access?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-19-2010 11:17 AM
тАО10-19-2010 11:17 AM
Solutionpasswd -l
For every user that you want to keep off the system.
cat /etc/passwd | awk '{ print $1 }' > /tmp/list
edit the list
while read -r un
do
passwd -l $un
done < /tmp/list
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
тАО10-19-2010 07:54 PM
тАО10-19-2010 07:54 PM
Re: HP/UX 11.11 Restricted access for maintenance?
You can lock other user duiring activity using command
passwd -l username
verify is it done..
/usr/lbin/getprpw username
you should see lockout=0000010
Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 05:08 AM
тАО10-20-2010 05:08 AM
Re: HP/UX 11.11 Restricted access for maintenance?
should i use the modprpw or passwd?
I want several accounts to remain active, but to lockout during maintenance all others, then after we get done to allow all users again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 05:15 AM
тАО10-20-2010 05:15 AM
Re: HP/UX 11.11 Restricted access for maintenance?
I am going to create a list per SRP's rec, to
for UU in `cat lockoutuser`
do
passwd -l $UU
done
for unlocking
Roll these two commands in place of passwd:
/usr/lbin/modprpw -l -m alock=NO $UU
/usr/lbin/modprpw -k $UU
Sound right?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 05:25 AM
тАО10-20-2010 05:25 AM
Re: HP/UX 11.11 Restricted access for maintenance?
Instead of:
for UU in `cat lockoutuser`
do
passwd -l $UU
done
...eliminate the extra process you spawn (the 'cat') and let the shell do this:
while read UU
do
passwd -l ${UU}
done < lockoutuser
...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 05:27 AM
тАО10-20-2010 05:27 AM
Re: HP/UX 11.11 Restricted access for maintenance?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 07:06 AM
тАО10-20-2010 07:06 AM
Re: HP/UX 11.11 Restricted access for maintenance?
would this work to unlock post maintenance?
while read UU
do
/usr/lbin/modprpw -l -m alock=NO $UU
/usr/lbin/modprpw -k $UU
done < lockuser.txt
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 09:37 AM
тАО10-20-2010 09:37 AM
Re: HP/UX 11.11 Restricted access for maintenance?
you can just run
/usr/lbin/modprpw -k $userid
Chandra
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО10-20-2010 09:44 AM
тАО10-20-2010 09:44 AM
Re: HP/UX 11.11 Restricted access for maintenance?
while read UU
do
/usr/lbin/modprpw -k $UU
done < lockuser.txt