NIS/NFS invokes wrong shell

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. ...


Go Back   Usenet Forums > Linux Forums > Linux Networking

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-20-2004
Rajsekar
 
Posts: n/a
Default NIS/NFS invokes wrong shell


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
Reply With Quote
  #2 (permalink)  
Old 05-20-2004
jack
 
Posts: n/a
Default Re: NIS/NFS invokes wrong shell

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"...
Reply With Quote
  #3 (permalink)  
Old 05-21-2004
Cameron Kerr
 
Posts: n/a
Default Re: NIS/NFS invokes wrong shell

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!
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 12:40 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0