Re: Interactive vs non-interactive shell for users

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dan G writes....
> 
> I understand that a shel like /bin/bash is interactive since it provides
> login and command execution for the user. What happens if you set a user's
> login shell to a non-interactive shell like /bin/sh. Does this allow script
> execution and login but no command execution?

No.  You can basically do the same thing, it's just that bash
is the standard to Linux.  And the Borune shell (sh)
is kind of "bare bones" where as some other shells have features
that make it a little easier to use interactively.  Like "command
completion."  

You see a lot of shell scripts written in Bourne  (#! /bin/sh)
cause it's almost gaurenteed to be in the same place, and it's
likely to be the same on most all machines.  ie stable and unchanged.
The downside.  It's unchanged.  Other shells have 'neat' features
that make life a little easier.

You can try it by just typing "sh" on the command line.
Then "ps" and you should see it.

Other fairly common shells are tcsh, csh, and korn.

But if you change your default shell, "chsh", be aware that
other shells use different login scripts when you log in.
You may have to tweek a little.

And OF COURSE you don't want to play around to begin with as
root.  (But then I KNOW no one would do that anyway...)
Create a seperate use and play away!
(tcsh is actually a really nice shell, for interactive use.)

> 
> 				Dan
> 
> 
> 
> 
> -- 
> Psyche-list mailing list
> Psyche-list@redhat.com
> https://listman.redhat.com/mailman/listinfo/psyche-list
> 


-- Jay Crews
jpc@jaycrews.com



-- 
Psyche-list mailing list
Psyche-list@redhat.com
https://listman.redhat.com/mailman/listinfo/psyche-list

[Index of Archives]     [Fedora General Discussion]     [Red Hat General Discussion]     [Centos]     [Kernel]     [Red Hat Install]     [Red Hat Watch]     [Red Hat Development]     [Red Hat 9]     [Gimp]     [Yosemite News]

  Powered by Linux