• Re: yppasswd problem - Error while changing the NIS password

    From davidramirezmolina@gmail.com@1:0/0 to All on Wed Dec 11 19:30:39 2013
    On Thursday, May 16, 2013 4:46:00 PM UTC-5, santiag...@gmail.com wrote:
    On Friday, February 8, 2002 3:35:07 PM UTC-3, Jeffery Smith wrote:

    I know others have had this problem, but I can't find a solution

    anywhere. When I try to change my password using 'yppassd' I get the

    following error:

    -----------------------------------------------------

    [smith@garfield smith]$ yppasswd

    Changing NIS account information for smith on zeus.

    Please enter old password:

    Changing NIS password for smith on zeus.

    Please enter new password:

    Please retype new password:

    Error while changing the NIS password.

    The NIS password has not been changed on zeus.

    -----------------------------------------------------



    In this senario:

    garfield = NIS Client (my workstation)

    zeus = NIS Server



    I have tried stoping 'ypserv' and then running it on a console with

    'ypserv -d' to see the messages, but I don't see anything helpful at

    all. This appears to be partially working because it successfully

    reads and checks my old password.



    I checked rpcinfo and it looks fine to me:

    -----------------------------------------------------

    [root@zeus yp]# rpcinfo -p | grep yp

    100007 2 udp 632 ypbind

    100007 1 udp 632 ypbind

    100007 2 tcp 635 ypbind

    100007 1 tcp 635 ypbind

    100004 2 udp 944 ypserv

    100004 1 udp 944 ypserv

    100004 2 tcp 947 ypserv

    100004 1 tcp 947 ypserv

    100009 1 udp 699 yppasswdd

    -----------------------------------------------------

    I can 'ypcat' my password file with no trouble. In fact, all my NIS

    maps are working fine. I just can't change any passwords.



    It may be interesting to note that on the NIS server (zeus) I can't

    use the 'passwd' command either.

    -----------------------------------------------------

    [root@zeus yp]# passwd smith

    Changing password for user smith

    New password:

    Retype new password:

    RPC: Can't encode arguments

    The password has not been changed on zeus.

    passwd: Failed preliminary check by password service

    -----------------------------------------------------

    It looks to me like this has something to do with RPC, but I really am

    clueless.



    All help is greatly appreciated!



    Jeffery Smith

    smith@skycomputers.com



    Some years later..



    How I get to change the user password with yppasswd for username as root;



    1. Edit the /etc/yp/shadow and remove the password field of the user.

    2. Save and close.

    3. Run yppasswd username again.





    Example:



    If I were to change the password of henryk, I would do as follows;



    1. Change the entry for the user at /etc/yp/shadow

    henryk:dsdkljHjshd3KsaEd:51265::::::

    to

    henryk::51265::::::



    2. Save and close.

    3. Run yppasswd henryk



    Changing NIS account information for henryk on myserver.

    Please enter root password:

    Changing NIS password for henryk on myserver.

    Please enter new password:

    Please retype new password:



    The NIS password has been changed on myserver.



    Hope this helps someone out there.

    As this fails silently (no traces on /var/log/messages, /var/log/scure) of what went wrong, I resulted here...

    In my particular case, the user to have its password changed had it actually disabled inside /etc/shadow such as:
    johndoe:!!:16050:0:120:7::17896:

    So as per santiag's hint I edited the shadow file (vipw -s) and removed the !! signs... then yppasswd worked as needed.

    Just my 1 cent here...

    --- MBSE BBS v1.0.1 (GNU/Linux-i386)
    * Origin: The Kofo System II BBS telnet://fido2.kofobb