- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: /etc/passwd permissions changed
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-29-2005 12:15 AM
03-29-2005 12:15 AM
/etc/passwd permissions changed
We are having problems with the permissions on the /etc/passwd file on an N Class HPUX server, using OS version 11.11. The problem is that twice over the last week the permissions have changed from what they should be (r--r--r--) to r-------- , when this happens users cannot log on!
I have checked things like rogue cron and at jobs. root is only in use by administrators (no one else should have the authority to change permissions) , and there is no root activity at the time when these incidents have occurred,
has anyone else seen a similar problem?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 12:17 AM
03-29-2005 12:17 AM
Re: /etc/passwd permissions changed
1) An Admin who thinks this is a good idea.
2) Someone else who has root (when was the last time the root password was changed)
3) What is the umask for root set to ? This could cause a problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 01:19 AM
03-29-2005 01:19 AM
Re: /etc/passwd permissions changed
logins -d
lastb -R -500
This command shows duplicate user ID's. If you see UID 0 assigned to something other than root, disable the rogue account and assume you have an intrusion. Of course, if you have 'safety' root accounts, you'll have to ignore these for the time being. However, good sysadmin technique forbids duplicate root IDs. Instead, you install and use sudo for *all* of your sysadmins and no one logs in as root except at the 'real' console. grep through all the shell history files for the word passwd:
grep passwd $HOME/.sh_history
grep passwd /home/*/.sh_history
($HOME above assumes you are logged in as root).
Now create a cron job that monitors the permissions of the passwd file. Do nothing until the permissions change, then when it does change, use logger to add an entry to syslog, and send email to all the admins (assuming email has been enabled). Example logger:
logger -t "/etc/passwd checker" -p local1.alert "/etc/passwd not 444!"
In your script, once logger has been run, run these commands and send them to a file (and email):
who -R
finger
last -R root -500
lastb -R -500
head -100 /var/adm/sulog
All the above listings will provide a timestamp of potential root users. Look for anyone logged in during the time that the file changed.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 01:29 AM
03-29-2005 01:29 AM
Re: /etc/passwd permissions changed
Sunil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 02:36 AM
03-29-2005 02:36 AM
Re: /etc/passwd permissions changed
One possibility is that the root passwd may be compromised as mentioned. Change the root passwd and setup the /etc/default/security file to have SU_ROOT_GROUP=<>. Only the members of this specific group have the ability to become root. Doesn't matter if they know the root passwd, if they are not in this group they won't become root.
Allow root login only on the console - /etc/securetty has CONSOLE as its contents.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-29-2005 06:40 PM
03-29-2005 06:40 PM