On Thu,21.May.09, 01:53:08, Sthu Deus wrote: > Good day. > > I have noticed that for some users in /etc/passwd the shell environment > is set as bash and for some as sh. This has led me to the following > questions: > > . Why is it so, meaning what is the meaning of it?
bash is better suited for actual users (persons), but if you write a bash-specific script it won't run under sh. On the other hand, bash can interpret sh scripts without any problem. That's why all scripts should either use only sh features or specifically declare they need bash (keyword: she-bang). > . Do I give more insecure environment to a user setting for him sh > instead of bash? Why would you want that? sh is not so good for an interactive shell and you already know it's actually a symlink to bash. > . Why I see that it works different regarding the set environment > (for some sh, for others bash), for, say, autorun scripts such > as .profile, bash_profile, if sh links to bash? bash will behave like sh (more or less) when called through a symlink called sh for compatibility reasons. More info about it in the man page and the info page, see package bash-doc. I have found that wikipedia can provide a good start for such basic questions. If you read the relevant page and don't understand it you could ask specific questions here. You might want to start with http://catb.org/esr/faqs/smart-questions.html first though. Regards, Andrei -- If you can't explain it simply, you don't understand it well enough. (Albert Einstein)
signature.asc
Description: Digital signature