1834862 Members
2542 Online
110070 Solutions
New Discussion

NIS question

 
SOLVED
Go to solution
maros
Advisor

NIS question

Hello,

I installed and configured NIS Master, Slave and all clients without problems. When I want to add a group on the Master server in SAM I go to 'Accounts for users and groups' and click on any of the icons 'Groups' or 'Local Users' or 'NIS Users' I am asked to enter the name of the password file used to build the NIS maps and the command used to build them. My question is - shall I always enter /etc/passwd or when clicked on 'Groups' in SAM shall I enter /etc/group?
Which command I should choose - make or ypmake (I would say 'ypmake')?
--
When I am on the master - in SAM in 'Networking and Communication' and 'Name Service Switch' (or /etc/nsswitch.conf) - shall I use local files as the first source? I have the same question for clients - shall I always use NIS as the first source and files as the second source? What about automounter - Local files or NIS?

Thanks a lot for your advice.
16 REPLIES 16
Clemens van Everdingen
Honored Contributor

Re: NIS question

S.K. Chan
Honored Contributor

Re: NIS question

When you build your NIS maps on the master, if you just leave those files like /etc/passwd, /etc/groups and other files that you want NIS to manage in its default location (ie /etc), then in SAM those files will always refer to /etc/passwd and /etc/group respectively. As for the "make" command, the default is "ypmake" (ie /var/yp/ypmake). For /etc/nsswitch always use NIS as the first source for the clients but for the server it's up to you, for me I use NIS as my first source always. For automounter again if you let NIS manage the automounter maps then use NIS as it's first source.
Sachin Patel
Honored Contributor

Re: NIS question

Hi Maros,
We have left all files /etc/passws /etc/group /etc/netgroup at same location. On server we uses file first on nsswitch.conf file so server will not stop booting if anything goes wrong. on slave and client we uses nis then files.

Sachin
Is photography a hobby or another way to spend $
maros
Advisor

Re: NIS question

Thanks guys. One question remained. When I am trying to add a new group SAM asks me (after clicking on Groups):
"Please enter the name of the password file used to build your NIS maps and select the command used to build them."
Command is clear - ypmake, but should the file be: /etc/passwd or /etc/group - although I am clicking on Group - SAM asks me for a password file - I tend to enter /etc/passwd - is this correct?

Anyway, when changing a user password on a client - does a user have to use yppasswd - because passwd does not give the possibility to change it (there is just some info).

Thanks once again.
Jeff Schussele
Honored Contributor

Re: NIS question

Hi maros,

On a client the user should use the standard passwd command as it will contact the rpc.yppasswdd daemon on a NIS server.
If the user uses the yppasswd command & is NOT in NIS there will be no consequences and the /etc/passwd WILL be updated locally.
So users can do it either way.
And yes when SAM asks for the passwd file - give it /etc/passwd.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: NIS question

1) Yes (/etc/passwd)
2) You can use the passwd command. At the end of a succesful password change it'll tell you something like .. "The NIS password has been changed on NIS master server.."
maros
Advisor

Re: NIS question

Thanks. The last question. When I use passwd on a aclient as a user - I get:
Supported configurations for passwd management are as follows:
passwd: files
passwd: files ldap
passwd: files nis
passwd: files nisplus
passwd: compat
passwd: compat AND
passwd_compat: nisplus

...and that's it. The prompt is returned.
NO POSSIBILITY TO CHANGE THE PASSWORD.

S.K. Chan
Honored Contributor

Re: NIS question

One possible reason for this error is there is something wrong with your /etc/nsswitch.conf file (maybe some syntax error). Can you post the content of that file ? If you're not sure of the syntax take a look at the nsswitch.conf template in /usr/newconfig/etc.
maros
Advisor

Re: NIS question

Hi S.K.

Thanks but I do not think the problem is in my nsswitch.conf - anyway here it is (from a client):

(I added blank lines for a better readability)

hosts: nis [NOTFOUND=continue UNAVAIL=continue] files [NOTFOUND=continue U
NAVAIL=continue TRYAGAIN=continue] dns [NOTFOUND=return UNAVAIL=continue TRY
AGAIN=return]

aliases: nis [NOTFOUND=continue UNAVAIL=continue] files

automounter: files [NOTFOUND=continue UNAVAIL=continue]

group: nis [NOTFOUND=continue UNAVAIL=continue] files

netgroup: nis [NOTFOUND=return UNAVAIL=continue] files

networks: nis [NOTFOUND=return UNAVAIL=continue] files

protocols: nis [NOTFOUND=return UNAVAIL=continue] files

passwd: nis [NOTFOUND=continue UNAVAIL=continue] files

services: nis [NOTFOUND=return UNAVAIL=continue] files

rpc: nis [NOTFOUND=return UNAVAIL=continue] files

publickey: nis [NOTFOUND=return UNAVAIL=continue] files

automount: files [NOTFOUND=continue UNAVAIL=continue
Jeff Schussele
Honored Contributor

Re: NIS question

maros,

On the client giving you trouble do
ypwhich
This should return either the master or slave NIS server.
If it does then do
ypcat passwd.byname
See if the user in question is in the map.
If not then do
pwck
on the client to check for problems with the local passwd file.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
S.K. Chan
Honored Contributor

Re: NIS question

Hi maros , last line .. you're missing a "]" or is it typo ?

automount: files [NOTFOUND=continue UNAVAIL=continue

S.K. Chan
Honored Contributor

Re: NIS question

One more thing .. I would recommend removing these 2 lines if automounter is not used.

automounter: files [NOTFOUND=continue UNAVAIL=continue]
automount: files [NOTFOUND=continue UNAVAIL=continue

The reason why is that these 2 are the only ones that has "files" as it's first preference and if those files are not setup right, you might have the problem that you're seeing.

maros
Advisor

Re: NIS question

Hi Jeff,

ypwhich returnms correctly thename of the NIS master and ypcat passwd.byname lists all the user, incl. the one in question. Anyway, I am getting this message on all clients for any user. yppasswd does the job but I would like to use passwd.

S.K.
Missing '[' was just due to the cut and paste thing... it is there...
I use automount...

Thanks.
S.K. Chan
Honored Contributor
Solution

Re: NIS question

Hi maros .. I don't give up .. do I .. :) ok I think I found out why .. in your nsswitch.conf file, for "passwd" reverse the order of search to "files" first then "nis". You are right the syntax of that file is correct but passwd command does not like the search order. Password query should check the local file first then only nis. Just try reversing the order on one of your machine and I think you'll not get the error anymore.




Sachin Patel
Honored Contributor

Re: NIS question

Hi Maros,
Sk is right passws first checks the file then nis.

try changing your nsswitch.conf file on client to just

passwd: nis file

It works for me.
Sachin
Is photography a hobby or another way to spend $
maros
Advisor

Re: NIS question

Hi S.K.

I did not stop believing in you, did I :-)))
Thanks very much. It really helped.