- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- tweaking init
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
05-03-2007 01:27 AM
05-03-2007 01:27 AM
tweaking init
I need to tweak one of the init levels so that only I and a couple of other users are able to log into the system. So essentially, I want to initiate an init command (init 2) which would restrict logins to specified few.
Can that be done? How would I go about it?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2007 01:48 AM
05-03-2007 01:48 AM
Re: tweaking init
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2007 01:51 AM
05-03-2007 01:51 AM
Re: tweaking init
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2007 01:54 AM
05-03-2007 01:54 AM
Re: tweaking init
when you enter into the init 2 stage, script runs (with proper Sxxx and Kxxx links created) and does this
check the status (locked/active) of the users you want NOT to be able to login. Store these in some file for reverting back to them.
then lock these users out.
do your thing at init level 2
when you go to init level 3 or above, using the file you created above, go ahead and restore those accounts' status back to where they were prior to you locking them out.
lock-out and restoration, may be handled differently depending on your OS security level, i.e., trusted or untrusted.
hope this helps
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2007 02:05 AM
05-03-2007 02:05 AM
Re: tweaking init
another way is to place a file in a known location (like /etc/downtime)
instead of locking / unlocking in passwd,
modify the system's /etc/profile to look for that file. if it finds it, check user id against a list of allowed users. if they are allowed, fine, else exit
at init 3, remove said file. this also lets you manually create the file to prohibit logins at higher run levels if needed
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2007 02:25 AM
05-03-2007 02:25 AM
Re: tweaking init
Modify /etc/profile
Have it check the variable LOGNAME against the output from who -r and log users out based on run level.
Shell scripting.
I don't know why the idea to touch init came to mind but its not the way to acheive the goal.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com