NIS - possible to extend group membership locally

Hello experts,
let's pretend there is a Solaris-box (5.7) which gets logon-information via NIS from a server where I don't have root-access.
Is it possible to extend group membership locally - where I have root-access?
E.g. asking NIS, "user1" is in "group1".
I want him to be in "group1" AND -locally- in "group2" .
Trying "usermod -G group1,group2 user1" brings "user1 does not exist".
If I try to "useradd user1" on the local machine it says "already in use".

I hope you get my point and have an idea how to solve this.

Many thanks in advance, krisse.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.


  You can edit /etc/group and add "group2" in it like
group2:x:<GID>:user1    <=== GID need to match group2's GID in NIS (do "ypcat group | grep group2")
And check the /etc/nsswitch.conf for the following line:
group:  files nis

Then "su - user1" as root and "groups" to check the if user1 in group2.



Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
krisse13Author Commented:
...which is exactly what I needed. Works fine.
I thought that if usermod can't do that, there would be no effect in editing /etc/group by hand. I was wrong.
Thank You, Wesly.
Actually, you can edit /etc/nsswitch.conf
passwd: files nis  <=== take out nis
group: files nis  <== take nis
And use "usermod".
Then put "nis" back.

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.