- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- NIS Scripts
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
06-25-2004 05:51 AM
06-25-2004 05:51 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2004 06:47 AM
06-25-2004 06:47 AM
Re: NIS Scripts
We have decided not to create user (modify passwd / group files) manually. But thru a script to have a locking mechanism to prevent two sysadmin's editing these files at the same time.
We do a yppush every 1 Hour to the slaves by a scheduler.. and this script also checks the lock.
The script takes care of taking backups of all the important file every time it is invoked. and we housekeep the backup ditrectory after 30 days ..
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2004 08:17 AM
06-25-2004 08:17 AM
SolutionThat having been said, your first task is to make sure that UID's and GID's are consistant across all machines. I'm sure you can handle the remsh to grab /etv/passwd and the extract the logins, UID's, and GID's from
all the boxes and look for mismatches.
Your next task is to change the ownership/group of all bad files on a given box.
I'll give you those scripts that I whipped up for someone fairly recently.
The first one is find.pl
It does a recursive descent and for each file found it writes a line of output
UID
filetype is a 2-digit octal value; it's main purpose is to identify the symlinks since we can leave those alone -- ownership doesn't matter in that case. If you are really concerned about symlink ownership, search the forums for lchmod.c -- I wrote a C program to do this.
Use it like this:
find.pl -s ./ > /var/tmp/filelist
Invoke as find.pl -u for full usage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2004 08:28 AM
06-25-2004 08:28 AM
Re: NIS Scripts
Create a text file with the following format:
OLD_UID NEW_UID
1 line for each uid you want translated.
Exactly the same format is used for a second file to translate GID's.
It reads the file generated by find.pl as stdin and looks at the translation table and does a chown to update UID/GID as needed.
A typical usage is:
fixuid.pl -U my_uid_table -G my_gid_table -e 100 < /var/tmp/filelist
Invoke as fixuid.pl -u for full usage.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-25-2004 08:36 AM
06-25-2004 08:36 AM
Re: NIS Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-27-2004 04:25 PM
06-27-2004 04:25 PM
Re: NIS Scripts
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2004 02:40 AM
06-29-2004 02:40 AM