[comp.unix.questions] changing shell with YP

omerzu@quando.UUCP (Thomas Omerzu) (05/07/90)

In article <48400004@uxa.cso.uiuc.edu> ddgg0881@uxa.cso.uiuc.edu writes:
>
>Can anyone tell me how to change my default shell on a network of Suns
>connected by Yellow Pages. chsh doesn't work. I guess that's because
>this command is designed to change your shell on just one machine. 
>
>Dale Gerdemann
>University of Illinois, Dept of Linguistics
>Cognitive Science Group, Beckman Institute
>dale@tarski.cogsci.uiuc.edu
>d-gerdemann@uiuc.edu

Well, chsh tries to find your login name in the local passwd file.
When you're running Yellow Pages it is most likely that chsh will not
find you there, since you are only entered in the passwd file
of the YP master.
If this happens, chsh does nothing.
The only solution I found is:

	rsh `domainname` chsh "user" "shell"

This will change the passwd file on the domain server.
One problem left: the master does not recognize the changes and
will not forward them to your machine. You'll have to wait until
the master gets rebooted.
If the master is running a yppasswdd - the YP passwd daemon - ,
you can use

	yppasswd "user"

to change your YP passwd.
This will enforce the yppasswdd daemon to rebuild the passwd database
on the YP master - including your changed shell entry.


Not very elegant, but working.