Changing Your NIS Passwords





Changing Your NIS Passwords

You should also test to make sure your users can change their NIS passwords from the NIS clients with the yppasswd command. The process is different whether there is only a single NIS master or a master-slave server relationship.

When There Is Only an NIS Master

When there is only a single NIS server, password changes can be made only on the NIS server using the yppasswd command.

Users Changing their Own Passwords

Users can change their passwords by logging into the NIS server and issuing the yppasswd command:

     [[email protected] nisuser]$ yppasswd
     Changing NIS account information for nisuser on bigboy.my-web-site.org.
     Please enter old password:
     Changing NIS password for nisuser on bigboy.my-web-site.org.
     Please enter new password:
     Please retype new password:

     The NIS password has been changed on bigboy.my-web-site.org.

     [[email protected] nisuser]$

User root Changing Passwords

The root user can change other users' passwords issuing the yppasswd command with the -p switch that specifies the username that needs the change.

     [[email protected] tmp]# yppasswd -p nisuser
     Changing NIS account information for nisuser on bigboy.my-web-site.org.
     Please enter root password:
     Changing NIS password for nisuser on bigboy.my-web-site.org.
     Please enter new password:
     Please retype new password:

     The NIS password has been changed on bigboy.my-web-site.org.

     [[email protected] tmp]#

When There Is a NIS Master and Slave Pair

With an NIS master and slave pair configuration, passwords can be changed on the NIS clients or the NIS slave, but not on the NIS master.

Possible Password Errors

There are a number of unexpected errors you may find when changing passwordserrors that have nothing to do with bad typing.

Segmentation Faults

Running the yppasswd command on the wrong client or server depending on your NIS master and slave configuration can cause segmentation fault errors. (Make sure you follow the chapter's guidelines for password changes!) Here are some sample password change failures on an NIS client with only one NIS master server:

     [[email protected] nisuser]$ yppasswd
     Segmentation fault
     [[email protected] nisuser]$

     [[email protected] root]# yppasswd -p nisuser
     Segmentation fault
     [[email protected] root]#

Daemon Errors

The yppasswdd daemon must be running on both the client and server for password changes to work correctly. When they aren't running, you'll get errors:

     [[email protected] etc]# yppasswd -p nisuser
    yppasswd: yppasswdd not running on NIS master host ("bigboy").
    [[email protected] etc]#

You'll also get a similar error if you attempt to change an NIS password on an NIS master server in a master and slave configuration.


     Python   SQL   Java   php   Perl 
     game development   web development   internet   *nix   graphics   hardware 
     telecommunications   C++ 
     Flash   Active Directory   Windows