1827218 Members
2164 Online
109716 Solutions
New Discussion

Re: NIS and passwd

 
SOLVED
Go to solution
Umapathy S
Honored Contributor

NIS and passwd

All,
I configured NIS on hpux11. As superuser when I try to invoke the passwd (cmd line) for some user, it asks for the old passwd. When accessed through SAM it doesnt ask for the same.

Is there any patch available or am I missing something here.

thanks,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
11 REPLIES 11
Michael Tully
Honored Contributor

Re: NIS and passwd

Sounds like it could be a PATH statement issue.

Try /sbin/passwd instead of /bin/passwd or /usr/bin/passwd
Anyone for a Mutiny ?
Umapathy S
Honored Contributor

Re: NIS and passwd

Michael,
I tried that too. It says Invalid login name. The login name is not in /etc/passwd but in /etc/nispw/passwd which I had created for NIS users alone.

How I can make /sbin/passwd to pick up users from NIS? Or how the root can change passwds of other users in NIS environment.

thanks,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
Zigor Buruaga
Esteemed Contributor

Re: NIS and passwd

Hi,

I don??t know NIS, but perhaps this can help you:
You say that SAM doesnt ask for the old passwd, so try to do it again with SAM and then click "Options" --> "View SAM Log", maybe you can find what command was used by SAM.

Only an idea.

Regards,
Zigor
Michael Tully
Honored Contributor

Re: NIS and passwd

Does

# /usr/bin/yppasswd

do anything ?
Anyone for a Mutiny ?
Michael Tully
Honored Contributor

Re: NIS and passwd

Umapathy,

Have a look at this posting as well. Did you look at the 'sam viewer log'?

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xcb1072106351d5118fef0090279cd0f9,00.html

Cheers
Michael
Anyone for a Mutiny ?
Zeev Schultz
Honored Contributor

Re: NIS and passwd

yppaswd for working with NIS passwd maps.
/etc/nsswitch.conf
passwd: nis
to let all those trying to get passwd use NIS.
Also I remember "+" entry in /etc/passwd (to preserve local users "root" etc and also use NIS passwd). In that case nsswitch.conf should
look like this:
passwd: files nis
So computers don't think yet. At least not chess computers. - Seymour Cray
Robert-Jan Goossens
Honored Contributor
Solution

Re: NIS and passwd

Hi Umapathy,

Take a look at next doc,

DocId: KBRC00007957

http://www4.itrc.hp.com/service/cki/docDisplay.do?docLocale=en_US&docId=200000062908900

Robert-Jan.
Umapathy S
Honored Contributor

Re: NIS and passwd

Zigor, thanks for the info. Didnt strike me at all. The cmd used is /usr/bin/passwd -f files -F/etc/nispw/passwd . When I try the same in command line, it doesnt ask for the old passwd.

Michael, I tried yppasswd. It asks for the old passwd again.

Zeev,
cat /etc/nsswitch.conf
passwd: files [NOTFOUND=continue UNAVAIL=continue] nis [NOTFOUND=return TRYAGAIN=return]
group: files [NOTFOUND=continue UNAVAIL=continue] nis [NOTFOUND=return TRYAGAIN=return]
hosts: files [UNAVAIL=continue] dns [NOTFOUND=return UNAVAIL=return TRYAGAIN=return]
aliases: files nis [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
automounter: files nis [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
netgroup: files nis [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
networks: files nis [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]
services: files nis [NOTFOUND=return UNAVAIL=continue TRYAGAIN=return]

Is this setup correct. Can you explain that + in /etc/passwd a little bit. Where can I find the info.

Robert, thanks for the doc. So effectively I cant use the same age old passwd as root :).

thanks,
Umapathy

Arise Awake and Stop NOT till the goal is Reached!
Robert-Jan Goossens
Honored Contributor

Re: NIS and passwd

Hi Again,

The + in the passwd file, is used for NIS users. If you do not add the + before a user NIS will think it is a local user.

local user
rjgo:VxnlhxewryhOo:104:20:Robert-Jan Goossens,,,:/home/rjgo:/usr/bin/ksh

NIS user
+abhs::::::

Hope it helps.

Robert-Jan.
Umapathy S
Honored Contributor

Re: NIS and passwd

Then should I have the NIS users listed in both /etc/passwd as well as /etc/nispw/passwd.

Say nistest1 in /etc/nispw/passwd as
nistest1:NS03pRQkpDoQQ:225:101:,,,:/home/nistest1:/usr/bin/ksh

and /etc/passwd as
+nistest1::::::

thanks,
Umapathy




Arise Awake and Stop NOT till the goal is Reached!
Robert-Jan Goossens
Honored Contributor

Re: NIS and passwd

Check the answer given by Zeev yesterday, if you setup nis to use /etc/nispw/passwd you can not define to use nis in the nsswitch.conf then nis will get confused.

Quote Zeev

____

2)go to /var/yp,see Makefile it has definitions,for example ALL_MAPS to build 'em all.I'd however just ignore messages from ypmake that it can't find map sources for hosts..etc (whatever you want use with NIS - define in /etc/nsswitch.conf WITHOUT "nis" of course).
_____

Hope it helps,

Robert-Jan.