- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Changing GID for two users in NIS
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
Discussions
Discussions
Forums
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
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
тАО07-28-2009 03:57 PM
тАО07-28-2009 03:57 PM
I have HPUX-11.00. i have 2 users in NIS master server, which have been assigned GID of 500, but i want to change GID to 501 and populate the changes on the NIS slave server. These NIS users does not exist in my local /etc/passwd. here is the user difference between local and NIS users.
root # cat /etc/passwd | wc -l
79
root # ypcat passwd | wc -l
5352
root #
Can you please provide the steps to do it. Its a very critical NIS master server. Please suggest on it.
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 01:00 AM
тАО07-29-2009 01:00 AM
Re: Changing GID for two users in NIS
Change these numbers on the NIS master.
Make sure these users do not exist at all on the NIS slaves except as NIS users. Make sure they do not exist as local users on any system.
ypmake
That should update things.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 01:27 AM
тАО07-29-2009 01:27 AM
Re: Changing GID for two users in NIS
You have to make the changes on NIS master server source files first and apply the changes to the NIS database.
Edit the /etc/passwd file on NIS master and change the GID or use this command to change it.
#usermod -g 501
Once you modified, run /var/yp/ypmake command. It will update the NIS maps and sync with slave servers.
You can also run yppush on master server or ypxfr on slave servers to synchronize the NIS maps between master and slave servers.
Ganesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 06:12 AM
тАО07-29-2009 06:12 AM
Re: Changing GID for two users in NIS
but as i pasted above, those users are NIS users only and do not exist in /etc/passwd. then how would i made changes to them on NIS master server.
usermod command will only edit the users in /etc/passwd. but if they dont exist there, then how would i do that. Also, one query, if i run this command
# ypmake passwd
It will update or modify my NIS password database, but i have only 79 users in /etc/passwd and 5352 users in NIS password databse. Would not ypmake overwrite my existing NIS password database(5352) with new one(79 only). Please clear my doubt on it.
if you have commands, can you please paste those here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 06:14 AM
тАО07-29-2009 06:14 AM
Re: Changing GID for two users in NIS
If those users do not exist on the NIS master then they are local users on the system you are testing.
They need to be migrated to the NIS database.
useradd them to the NIS Master
ypmake
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 06:24 AM
тАО07-29-2009 06:24 AM
Re: Changing GID for two users in NIS
>These NIS users does not exist in my
>local /etc/passwd. here is the user
>difference between local and NIS users.
So this is local:
>root # cat /etc/passwd | wc -l
>79
and this is NIS:
>root # ypcat passwd | wc -l
>5352
?
That's the sense of NIS - users are ONLY in the NIS server passwd and the clients get the login information from there.
So you don't overwrite anything at the clients, but you have to make the changes at the NIS server.
You also have to change /etc/group !
There GID 501 has to be created, too.
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 06:31 AM
тАО07-29-2009 06:31 AM
Re: Changing GID for two users in NIS
also - if you run ypmake command at the client nothing will happen.
If you do it at the NIS client, I don't know, but I believe as long as it run as a client nothing will happen too.
Nevertheless you ONLY make user changes at the NIS server.
You can check which one it is with the command 'ypwhich'.
HTH
Volkmar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 07:10 AM
тАО07-29-2009 07:10 AM
Re: Changing GID for two users in NIS
They are there in NIS master database. please find the below output. It will give you some picture.
root # ypcat passwd | grep -i spainter
spainter:UlCd2pvwwcC/k,A/BU:11556:500:Seimens walter:/home/spainter:/bin/ksh
root # cat /etc/passwd | grep -i spainter
root #
Please tell how can i change the GID from 500 to 501. i think usermod will only work on /etc/passwd but not on passwd.byname.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 07:17 AM
тАО07-29-2009 07:17 AM
Re: Changing GID for two users in NIS
@Volkmar
1. Its the NIS master server. and plz tell if i run ypmake on NIS master server, then does it overwrite my existing NIS password database.
2. GID 501 is already exists in /etc/group.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-29-2009 07:31 AM
тАО07-29-2009 07:31 AM
SolutionDo this. check the content of the file /var/yp/Makefile on NIS master and look at the below entries.
DIR = /etc
..
..
..
PWFILE = $(DIR)/passwd.yp
Makefile is the source file used to create the NIS Maps. Just edit the /etc/passwd.yp file and modify the GID. Once you modify, run the ypmake command which will update the NIS maps and synchronize the slave servers.
Ganesh.