- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Emergency script help please.
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
01-25-2006 08:39 AM
01-25-2006 08:39 AM
Emergency script help please.
chown -h 15267:1039 '/home/'
chown -h -1400:1051 '/var'
#comment that may interfere with columns
I need to be able to keep the same script and correct the negagive value for the owner to a valid pasitive value. I am dealling with hundreds of thousands of file.
Many Many Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 09:11 AM
01-25-2006 09:11 AM
Re: Emergency script help please.
If the ownership of a file or directory is shown numerically, this merely suggests that the mapping of number-to-name cannot be made (usually through '/etc/passwd').
Do you have an 'etc/passwd' file? Are you running NIS? Did you restore files, and if so to the correct server?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 09:49 AM
01-25-2006 09:49 AM
Re: Emergency script help please.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 10:20 AM
01-25-2006 10:20 AM
Re: Emergency script help please.
I don't understand what you restored. If is is only the directory take has the wrong ownership, do something like:
# chown root:sys /home
If you want to recursively 'chown' a directory (and all its subordinate contents!) use:
# chown -R bin:bin /mydir
Be careful here.
Perhaps you want to find files whose ownership doesn't match login accounts on your server:
# find /home -xdev -nouser
# find /home -xdev -nogroup
Does this help?
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2006 02:13 PM
01-25-2006 02:13 PM
Re: Emergency script help please.
Now if the affected files are supposed to be owned by a valid user, then you'll have to extract these filenames (with full path and user/group info) from your backup and create a sceript to change each file (chown/chgrp).
Bill Hassell, sysadmin