I've noticed when you add a user in /etc/passwd without a spicified shell (like /bin/sh, /bin/bash, so forth), the variable $SHELL assumes to be void. So some application like gnome-terminal dont work correctly. It should be : if ($SHELL == '') then SHELL="/bin/sh"; at least. bye
You need to be more specific as what you think is broked/want changed.
What more can I say? Try to install gnome-terminal using a new account without a psecified shell like: sciack:x:406:100:Mauro Sciaccaluga:/home/sciack: instead of: sciack:x:406:100:Mauro Sciaccaluga:/home/sciack:/bin/bash I think that if someone doesnt specify his preferred shell login should assume /bin/sh as default shell.
It is the way that adduser from shadow works .... If you really want that changed, guess you will have to do a bugreport with them, or patch adduser.
Hey.. I'm not talking about "adduser".. this is a strage behaviour of LOGIN (i think)... the variable $SHELL should point always to a DEFAULT SHELL like /bin/sh. But it doesnt. Please try to understand what I'm saying... bye
$SHELL will point to the shell in /etc/passwd. Thus if you do not have one defined, and want what you want, you must either: 1) hack adduser to add a shell by default if not specified 2) hack login to set $SHELL to something if one is not defined by default in /etc/passwd. Either means patching some or other util to behave as not expected in general. Point is, the guru's that designed these decided not to set anything by default if not defined. In general, the admin who adds accounts, *should* know to also define a default shell for the user if required.
I thought you were right... but investigating i discover that by default it should work: /* * Create the SHELL environmental variable and export it. */ if (info->pw_shell == (char *) 0 || ! *info->pw_shell) { static char temp_pw_shell[] = "/bin/sh"; info->pw_shell = temp_pw_shell; } addenv("SHELL", info->pw_shell); libmisc/setupenv.c, setup_env function, in pam_login package. Take a look. thanks
I discovered: if i do an adduser testing and logging in as testing and doing echo $SHELL, it works. So login works. But if I do it with GDM or KDM, it doesnt.
Similar bugs: http://bugs.gentoo.org/show_bug.cgi?id=4313 http://bugs.gentoo.org/show_bug.cgi?id=4955 http://bugs.gentoo.org/show_bug.cgi?id=5629 http://bugs.gentoo.org/show_bug.cgi?id=5683 http://bugs.gentoo.org/show_bug.cgi?id=5699 everyone has something diff to say ... think it should all be wrapped up and put into 1 bundle though ;)
*** Bug 9374 has been marked as a duplicate of this bug. ***
Added /etc/default/useradd with default shell of /bin/bash to shadow-4.0.3-r3.