Networking Forums

Networking Forums > Computer Networking > Linux Networking > NIS/NFS invokes wrong shell

Reply
Thread Tools Display Modes

NIS/NFS invokes wrong shell

 
 
Rajsekar
Guest
Posts: n/a

 
      05-20-2004, 10:11 AM

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
 
 
 
 
jack
Guest
Posts: n/a

 
      05-20-2004, 09:06 PM
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
 
Cameron Kerr
Guest
Posts: n/a

 
      05-21-2004, 07:04 AM
Rajsekar <(E-Mail Removed)> 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
(E-Mail Removed) : http://nzgeeks.org/cameron/
Empowered by Perl!
 
Reply With Quote
 
 
 
Reply

Thread Tools
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
shell commands mu91t Linux Networking 3 08-07-2008 12:05 PM
shell mu91t Linux Networking 1 08-02-2008 06:30 AM
Can we write our own shell?? bobby Linux Networking 6 11-09-2006 04:12 PM
UK Shell Provider templarshells@yahoo.co.uk Broadband 1 05-03-2006 08:33 AM
p2p on shell. Mr_jud Linux Networking 0 12-08-2005 05:04 PM



1 2 3 4 5 6 7 8 9 10 11