- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- chmod 777 entire filesystem
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
09-07-2001 05:12 AM
09-07-2001 05:12 AM
someone of our customers has done a chmod 777 of his entire filesystem... well... I guess it is better than doing a 444 on everything but still... :]
This is one of the errors that now occur : when you are a normal user and you type "su - root", you can type the root's password but then it says : su: Invalid ID.
I suppose HP-UX is checking something ? How can I get that command to work ?
I know that the HP-UX security has been blown to bits but for the few users on this station it doesn't really matter who has access or not... but it appears to me that it DOES matter for the OS itself. Can anyone confirm this to me ? Because if it so, I will have to put back the rights to every file (or at least those containing configs) by hand or by a full restore of the system. Of course I would like to avoid the latter...
Any info is welcome,
TIA,
Jeroen.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:22 AM
09-07-2001 05:22 AM
Re: chmod 777 entire filesystem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:31 AM
09-07-2001 05:31 AM
Re: chmod 777 entire filesystem
Bunch of work to get back each file to original.
I would do a system restore.
They most likely already know not to do that again.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:32 AM
09-07-2001 05:32 AM
Re: chmod 777 entire filesystem
I hate to say this, but I think you have no choice but to restore from backup. There are far too many files that need to be changed.
There are several commands that need the suid bit set, this includes su, login..in fact, doing a find in /usr/bin for progs with suid set produces this list:
/usr/bin/mediainit
/usr/bin/bdf
/usr/bin/rcp
/usr/bin/remsh
/usr/bin/at
/usr/bin/crontab
/usr/bin/mail
/usr/bin/rmail
/usr/bin/newgrp
/usr/bin/nfsstat
/usr/bin/chkey
/usr/bin/chfn
/usr/bin/df
/usr/bin/login
/usr/bin/su
/usr/bin/chsh
/usr/bin/nispasswd
/usr/bin/passwd
/usr/bin/yppasswd
/usr/bin/pppd
/usr/bin/rdist
/usr/bin/rexec
/usr/bin/rlogin
/usr/bin/uucp
/usr/bin/uuls
/usr/bin/uuname
/usr/bin/uusnap
/usr/bin/uustat
/usr/bin/uux
/usr/bin/ct
/usr/bin/cu
/usr/bin/kermit
/usr/bin/cancel
/usr/bin/disable
/usr/bin/enable
/usr/bin/lp
/usr/bin/lpalt
/usr/bin/lpstat
/usr/bin/slp
/usr/bin/X11/hpterm
/usr/bin/X11/xterm
And that was only on /usr/bin and only checking for suid, you'd have to check in /usr/sbin, /usr/lbin, /sbin, etc and you'd have to check for sgid programs too.
Hope this helps.
-Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:45 AM
09-07-2001 05:45 AM
Re: chmod 777 entire filesystem
to reconstruct the most files and directotries use this script:
#!/sbin/sh
find /var/adm/sw/products -name INFO -exec cat {} \; |
awk '{
if($1 == "path") path=$2;
if($1 == "mode" && path ~ "^/") printf("chmod %s %s\n",$2, path);
}' | sort -u >perm_reset.sh
After this script has finished it has created a new script called perm_reset.sh
Run the perm_reset.sh to set things right.
Good luck
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:49 AM
09-07-2001 05:49 AM
Re: chmod 777 entire filesystem
Andreas Voss provided an elegant script to address this problem once before. See his post (with the script attached) here:
http://forums.itrc.hp.com/cm/QuestionAnswer/1,1150,0xa7ef6c96588ad4118fef0090279cd0f9,00.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 05:53 AM
09-07-2001 05:53 AM
Re: chmod 777 entire filesystem
I did it same thing. I thought I am in my home while I was in /. Pain in ...
Easy solution is to restore OS.
Sachin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 06:05 AM
09-07-2001 06:05 AM
Re: chmod 777 entire filesystem
that script looks really nice and I was about to give you a 10/10 when I noticed it checks the /var... and damned... that customer still has the old HP-UX 9.05 running.
You wouldn't happen to have another script that would prevent me of doing a full system restore ?
Jeroen.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2001 06:37 AM
09-07-2001 06:37 AM
Solutionoooh these old days ...
I had a look at my HP9000/433s (HP-UX 8.0)
and have found that in /system/... there are files named pdf which contain information of installed files.
I put you a script at attachment.
Hope this works also under HP-UX 9.x
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-13-2001 12:50 AM
09-13-2001 12:50 AM
Re: chmod 777 entire filesystem
Your script rocked and now the system is back up and running as it should.
Tnx again ! You deserved the 10/10.
Jeroen.