This is a discussion on NIS/NFS invokes wrong shell within the Linux Networking forums, part of the Linux Forums category; I have been setting up NIS/NFS in some of the new comps (with fedora). I encountered the following problem. ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I have been setting up NIS/NFS in some of the new comps (with fedora). I encountered the following problem. Our NIS is a SUN Solaris machine and our NFS is a linux machine. For most users the shell is /usr/local/bin/bash according to the NIS. But the new comps have bash in /bin/bash. So when a user tries to login, it says command not found /usr/local/bin/bash and exits. I tried linking /usr/local/bin/bash to /bin/bash and it works properly. But I read over net that if I put the following into /etc/passwd it should work. +:*::::::/bin/bash. But it does not Please help me. Thank you -- M Rajsekar |
|
|||
|
Rajsekar wrote:
> Our NIS is a SUN Solaris machine and our NFS is a linux machine. > For most users the shell is /usr/local/bin/bash according to the NIS. But > the new comps have bash in /bin/bash. So when a user tries to login, it > says command not found /usr/local/bin/bash and exits. I tried linking > /usr/local/bin/bash to /bin/bash and it works properly. But I read over > net that if I put the following into /etc/passwd it should work. > > +:*::::::/bin/bash. > But it does not You found the problem Yorself. - Good. The advice: There should be some "default" shell linked to "/bin/sh". This way, You can simply add new users and assign the default shell to them as their login shell. - You can easily change the default by simply replacing this link rather than modifying "/etc/passwd" when- ever You want to do this. You are able to allow certain users to use their individual shlell, though. In Your above example (or, situation), Your linking simply points the wrong way around. - Your idea is absolutely correct, though. To make things easy for You: Create a "/bin/sh" as a default user shell, and make that a soft-link to the shell You want people to use ("/bin/bash", most preferrably, or "/usr/local/bin/bash"). Keep in mind that the "/usr/local/bin" directory may be "world write- able". Short answer to all this: Re-read "man ln", and most likely, You'll be done. - Make "/bin/sh" the default shell, and make that a link to the apropiate binaries. You will still be able to allow specific users specific shells. But when it comes to scripting, this will be essential, since most (if not all) scripts start with "#!/bin/sh". Cheers, Jack. -- ---------------------------------------------------------------------- My personal reading of the string "MicroSoft" expands to "NanoWeak"... |
|
|||
|
Rajsekar <raj.nospam.sek.delete.ar@peacock.iitm.ernet.in> wrote:
> Our NIS is a SUN Solaris machine and our NFS is a linux machine. > For most users the shell is /usr/local/bin/bash according to the NIS. But > the new comps have bash in /bin/bash. Create a symbolic link /bin/bash on each machine that uses /usr/local/bin/bash. -- Cameron Kerr cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/ Empowered by Perl! |