- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- disableing ALL user access trusted system
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
11-06-2001 02:55 PM
11-06-2001 02:55 PM
I'm wondering what the best way is to disable ALL user logins to a trusted system.
I have a trusted system and would like to occasionally stop all users from logging in.
I know on an untrusted system it is possible just to log onto the console as root, lock the console and copy the password file out.
However, on a trusted system I suspect that this wont work and I'm not in the mood for a broken machine.
Any ideas?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:01 PM
11-06-2001 03:01 PM
Re: disableing ALL user access trusted system
As root from the console,
touch /etc/nologin
unconvert the system
cp /etc/passwd /etc/passwd.old
convert the system
rm /etc/nologin
One thing to know, the auditing files will be removed so if you want them ...
Good Luck,
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:03 PM
11-06-2001 03:03 PM
Re: disableing ALL user access trusted system
I've thought of doing this, but the problem is when re-converting to a trusted system, I think it requires all users to change their passwords when logging in.
Is this correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:06 PM
11-06-2001 03:06 PM
SolutionSince it was already a trusted system, I think accounts should be ok, as opposed to a new conversion...
C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:10 PM
11-06-2001 03:10 PM
Re: disableing ALL user access trusted system
I'll give it a go on my test box now.
Why not I say!
I'll let you know how it goes.
Thanks
Scott.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:16 PM
11-06-2001 03:16 PM
Re: disableing ALL user access trusted system
Here is how to set it up so that /etc/nologin will work on 11.X systems. From TKB document KBRC00005800
You need to have HP-UX 11.0 and the latest cumulative login patch or HP-UX 11.11 which has this feature incorporated in the login command.
Patch required for HP-UX 11.0:
PHCO_24083 s700_800 11.00 login(1) cumulative patch
NOTE: As with all patches, please refer to the Patch Database for the most recent version of this patch.
Follow these steps to activate the nologin parameter:
1. Create the file /etc/default/security and add the nologin parameter. This file must be world readable and root writable.
# vi /etc/default/security
Add the following line and save the file:
NOLOGIN=1
# chown root /etc/default/security
# chmod 644 /etc/default/security
2. Then, create the file /etc/nologin, and add the message you would like your users to see, example:
# vi /etc/nologin
System maintenance is taking place, please login again after 4:00 PM.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:16 PM
11-06-2001 03:16 PM
Re: disableing ALL user access trusted system
use the modprpw command
to do this.
****
while read -r USER
do
/usr/lbin/modprpw -l -m alock=YES $USER
if [ $? -eq 0 ]
then
echo "$USER deactivated" >>deactivate.log
else
echo "'failed to deactivate $USER" >>deactivate.log
fi
done< userlist
****
Remember not to deactivate
root and system related accounts ;-)
To enable them replace
the modprpw command above with
/usr/lbin/modprpw -l -k $USER
-raj
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 03:37 PM
11-06-2001 03:37 PM
Re: disableing ALL user access trusted system
If you are using the /etc/nologin functionality, and are NOT working from the console or have web console access, make sure that you temporarily move the file /etc/securetty (assuming the file contains the word console) so that root can login from anywhere and not just the console.
If you use nologin, and have /etc/securetty set and you log out of your terminal, you are going to have a hard time getting back in as root, unless you have console access.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 04:00 PM
11-06-2001 04:00 PM
Re: disableing ALL user access trusted system
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-06-2001 06:20 PM
11-06-2001 06:20 PM
Re: disableing ALL user access trusted system
You can emulate /etc/nologin in /etc/profile with something like this:
if [ -r /etc/nologin ]
then
if [ "$(/usr/bin/id -u)" = "0" ]
then
/usr/bin/banner "No user"
/usr/bin/banner "logins"
echo "\n\nSystem Maintenance underway.\n\n"
else
echo "\n\n\n\nNo logins allowed at this time.\n"
/usr/bin/cat $NOLOGIN
sleep 5
exit
fi
fi
Be sure to change /etc/csh.login too if your users run csh rather than POSIX shell or ksh.
Bill Hassell, sysadmin