Description of problem: "chsh" and "chfn" find only local users (in /etc/passwd) and can change only their attributes. "passwd" is able to find user not only in local database /etc/passwd but also in nis and is able to change their nis password on the nis master server (using rpc.yppasswdd on the nis server). I think it would be a good idea that the commands "chsh" and "chfn" use the same mechanisms to lockup and change attributes of users like "passwd" does. The service rpc.yppasswdd is able to change the shell and the finger information of a nis user in addition to changing the nis password of a nis user. Version-Release number of selected component (if applicable): util-linux-2.23.2-4.fc19.x86_64 libuser-0.59-1.fc19.x86_64 passwd-0.79-1.fc19.x86_64 How reproducible: Always Steps to Reproduce: 1. Configure a nis master server running service yppasswdd.service. 2. Create a user in nis on the nis master server. 3. Configure a nis client using the nis master server (or a nis slave server of it). 4. Log in as a nis user. 5. Try changing the login shell of the nis user using "chsh". 6. Try changing the login shell of the nis user using "ypchsh". 7. Try changing the passwort of the nis user using "passwd". Actual results: chsh results in an error message that the nis user does not exist. chsh: user "NISUSER" does not exist. (Substitute NISUSER by the real username.) ypchsh works as expected and changes the login shell of the nis user on the nis master server. passwd works as expected and changes the password of the nis user on the nis master server. Expected results: All the commands above change the user attriutes (shell, password, etc...) of the nis user on the nis master server. Additional info: Users can use "ypchsh" but they have to know that they must use this instead of "chsh". There is no note on the error message of "chsh" that "ypchsh" should be used instead. It only tells us that the user is not found. I think the system (e.g. the program or a library or system call) should find the user in the configured databases, it should not leave it to the regular user to use different commands and to know which is the right command for his case (e.g. that he is a nis user and should the prefix "yp").
The chfn and chsh uses libuser to change the information and it also supports non-local accounts. (Well, there is obsolete info in the man pages, I'll fix it.) Unfortunately it seems that libuser has no NIS support (I see kerberos, ldap and sasl modules for the library). Re-assigning to libuser.
Thanks for your report. I'm afraid NIS report in libuser is not currently planned, and with libuser itself probably being obsoleted within the next few years, unlikely to appear.