HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: NIS Automation
Operating System - HP-UX
1833816
Members
2626
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-25-2002 04:38 AM
09-25-2002 04:38 AM
NIS Automation
Greetings, I am currently implementing a NIS domain to about 80 HP-UX Servers. I was wondering if any one had a way to converting each user's UID (currently 3 digits) into a new 5 digit standard and furthermore go back to the original server it came from and updating it there to ensure proper file ownership issues.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2002 05:05 AM
09-25-2002 05:05 AM
Re: NIS Automation
You already have it. UID are actualy not digits but a two-byte hexadecimal number. Two bytes go up to (dec) 65535, which is a digits.
There are reasons not to change the UID's of users:
- every file in your filesystems has the UID of the owner, you will have to change that for every file each user owns.
- When you need to restore from a previous backup, the 'old' UID's are on the tape, so they don't match anymore with the 'new' UID
I bet other members come up with more reasons.
That leaves you with the situation where on different systems a UID belongs to different users. This sure is a pain.
There are reasons not to change the UID's of users:
- every file in your filesystems has the UID of the owner, you will have to change that for every file each user owns.
- When you need to restore from a previous backup, the 'old' UID's are on the tape, so they don't match anymore with the 'new' UID
I bet other members come up with more reasons.
That leaves you with the situation where on different systems a UID belongs to different users. This sure is a pain.
My systems are 100% Murphy Compliant. Guaranteed!!!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-25-2002 05:43 AM
09-25-2002 05:43 AM
Re: NIS Automation
There is a command called usermod which may do what you want. It will modify any piece of the user ID, which includes permissions on the home directory recursively. (Check to ensure you dont choose a person with a home of "/")!!!!!
I.E.
set -i
UID=20001
% for NAME in `cat /etc/passwd|grep -v root|grep -v lp|awk -F: '{print $1}'` ; do
#AND FILL ALL THE OTHER NOT ROOT STUFF IN HERE THAT DONT GET MODIFIED
# AND BUILD IN TESTS SO YOU DONT KILL YOUR OS
% usermod -u $UID $NAME
% UID=`expr $UID + 1`
% done
As someone else mentioned, this brings up other issues to at least plan for. I.E. backups will require an additional step to chmod because the UID is stored on the tape, not the user name.
Regards
Shannon
I.E.
set -i
UID=20001
% for NAME in `cat /etc/passwd|grep -v root|grep -v lp|awk -F: '{print $1}'` ; do
#AND FILL ALL THE OTHER NOT ROOT STUFF IN HERE THAT DONT GET MODIFIED
# AND BUILD IN TESTS SO YOU DONT KILL YOUR OS
% usermod -u $UID $NAME
% UID=`expr $UID + 1`
% done
As someone else mentioned, this brings up other issues to at least plan for. I.E. backups will require an additional step to chmod because the UID is stored on the tape, not the user name.
Regards
Shannon
Microsoft. When do you want a virus today?
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP