- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Temporarily Deactivating 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
03-12-2001 12:37 PM
03-12-2001 12:37 PM
I would like to be able to temporarily keep certain users from loggin on to my HP-UX 11.0 system. I don't want to have to go into single-user mode. I'm wondering if I can just comment the usernames out of the /etc/passwd?
The reason I would like to do it this way is that I need the users to have the same password when I re-enable them. Will this method work? Or, is there a better way to temporarily disable many users at a time?
Thanks for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 12:56 PM
03-12-2001 12:56 PM
Re: Temporarily Deactivating Users
but the choice is yours..
/rcw
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 01:08 PM
03-12-2001 01:08 PM
Re: Temporarily Deactivating Users
But, I think you can only deactivate one user at a time in SAM. I will need to deactivate around 50-100 users, so I'd rather do it in a script. Or at least in bulk, somehow.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 02:42 PM
03-12-2001 02:42 PM
Solutionsomething like
# vi /etc/passwd
0,$s/\/usr\/bin\/sh/\/usr\/bin\/false
* which should subsitute /usr/bin/sh with /usr/bin/false from line 0 to very last line. Make a backup first!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 02:49 PM
03-12-2001 02:49 PM
Re: Temporarily Deactivating Users
Editing /etc/passwd will work .But make sure that you have the uers logout when you edit this file else it is of no use .
Also make a copy of /etc/passwd as well .
Karthik...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 05:01 PM
03-12-2001 05:01 PM
Re: Temporarily Deactivating Users
if [ -r /etc/nologin ]
then
case $LOGNAME in
root);;
bmarkus);;
oracle);;
esac
fi
Hope this helps,
Brian
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-12-2001 05:51 PM
03-12-2001 05:51 PM
Re: Temporarily Deactivating Users
or you can use a script to place a temporary password file that greps out the uers you don't want to have access.