Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Local accounts on an NIS network - can't set passwd

Status
Not open for further replies.

Technobie

MIS
Oct 13, 2003
18
US
I'm having a little problem. [3eyes]

I need to setup a local account on one server - I do not want it in the NIS domain.

Ok, so I have added the user to /etc/passwd, /etc/shadow and /etc/group. Created the home dir. Now I'm ready to set the password. I try (as root or su to the new user) passwd -r files username. This is what I get:
# passwd -r files username
passwd(SYSTEM): username does not exist
Permission denied

This same message happens when I try and reset root's passwd too.

Here is what my nsswitch.conf file looks like:
passwd: compat nis files
group: compat nis files

Thanks!

Chris
 
passwd -r files username should work.

May be you can check for any typo errors in /etc/passwd/, /etc/group, and /etc/shadow.

and retry with passwd -r files username.

check whether the same username exists in nis database. if so, change the user name. or check for any clashing uids/gids with nis database.

btw, why do you need a local user if you can access the machine from nis.
 
Teknobe,
Also in you nsswitch.conf... Try this:

passwd: compat files nis
group: compat files nis

This way, passwd and group local files are looked at before the NIS maps.

BTW what is compat?
 
ramu74 - I did double/triple check all my spelling and there are no other users even closely named. The user was setup specifically for samba use - I just don't want it in the NIS domain and restrict it via netgroups.

bfitzmai - I have thought about that and asked the senior admin if I could change to the format above, but she was hesitant about it. I think compat defaults to read nis first...not sure...I may be totally wrong.

Chris
 
When I need to set up local hosts that are not on the NIS maps, I modify the nsswitch.conf to look at files first. Never tried it with local users. Never heard of compat... Will have to look into it.
 
Thanks bfitzmai - I will have to change the nsswitch.conf then. I'll keep you all posted!
 
In the nsswitch.conf man page it is implied that there will be problems with the function of `passwd` unless your passwd entry is formatted a certain way. It also says that it can be overridden by using the format you supplied. It maybe worth a look, though.

HTH
Brian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top