modify /etc/profile to have automatically bash when you add user

Hello everybody,

I'm a new user of FreeBSD (and I'm new in this forum), so I introduce myself: I'm freekette, and I would like discover Unix. So I'm trying FreeBSD for fun in a virtual machine (for the beginning)!

Now my question: I didn't like csh (I'm in the habit of using bash), so I've changed it using chsh. But now, I would like that, when I add user, the defaut shell be bash.

I tried (in /etc/profile)
Code:
SHELL=/usr/local/bin/bash
But that changes nothing: the default shell is always csh when I add a user.

What's wrong? Someone can help me?

Thank you.

(sorry for my english! :\)
 
Thank you fonz and wblock@! I created adduser.conf, and I wrote
Code:
defaultshell=usr/local/bin/bash
and that works!

@Martillo1: just a question: why may I never change the root's shell? Why do you recommend me to NOT change this shell?

Finally, just a last question: imagine I want that for each new users something specific was done (eg: create a new directory, or a new file, or something else), is it possible to force the system to execute a script or to do an action when you add a user?

Thanks a lot.

(and still sorry for my english !)
 
Just search for the forum for "root shell bash" and you'll find many threads from people who've done this ... and cried themselves to sleep because of it. :)
 
freekette said:
Thank you fonz and wblock@! I created adduser.conf, and I wrote
Code:
defaultshell=usr/local/bin/bash
and that works!
Not sure if it's a typo but it should be /usr/local/bin/bash.

@Martillo1: just a question: why may I never change the root's shell? Why do you recommend me to NOT change this shell?
Bash is not part of the base. Search this forum and you will find lots of people having issues logging in after an update. To save yourself a lot of headaches, don't change root's shell.

Finally, just a last question: imagine I want that for each new users something specific was done (eg: create a new directory, or a new file, or something else), is it possible to force the system to execute a script or to do an action when you add a user?
Have a look at the so-called 'skeleton' files in /usr/share/skel/.
 
phoenix said:
Just search for the forum for "root shell bash" and you'll find many threads from people who've done this ... and cried themselves to sleep because of it. :)

Oh year, i remember. :D That is an experience everybody must make. After that he will never do it again. ;)
 
Back
Top