LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-14-2006, 04:28 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
new users' default shell


My new users are being set up with sh as their default shell instead of bash if I don't specify bash in the useradd command.

I thought bash should be the system-default shell. Did I screw something up? Where is this configured?

(Debian 3.1 with 2.6 kernel)
 
Old 02-14-2006, 04:35 PM   #2
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 167Reputation: 167
The /etc/passwd file holds the default shell information. You are correct, if you don't specify a shell with useradd, sh will be the default shell (on the box I just tried it anyway - Slackware 10.2).
 
Old 02-14-2006, 05:04 PM   #3
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
I just tried it on another Debian Sarge box (installed about a year ago) and on my Gentoo box. Both of them set up a new user with bash even though I didn't use the -s option in useradd.

So I'm guessing that there must be something that can be set in some file to configure this. Anybody know where?

Last edited by r.stiltskin; 02-14-2006 at 05:05 PM.
 
Old 02-14-2006, 05:29 PM   #4
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Found it:
the file is /etc/default/useradd

useradd -D (or /usr/sbin/useradd -D)
will display the file's contents

useradd -D -s /bin/bash
will set the default to bash
 
Old 02-15-2006, 12:57 PM   #5
Wells
Member
 
Registered: Nov 2004
Location: Florida, USA
Distribution: Debian, Redhat
Posts: 417

Rep: Reputation: 53
Just a note... on my system, /bin/sh is just a symlink to /bin/bash, so it really makes no difference.
 
Old 02-15-2006, 04:27 PM   #6
gilead
Senior Member
 
Registered: Dec 2005
Location: Brisbane, Australia
Distribution: Slackware64 14.0
Posts: 4,138

Rep: Reputation: 167Reputation: 167
There are some differences in the way bash behaves if it is invoked as sh. It does not read ~/.bash_profile, for example, it looks for ~/.profile instead. Also, bash tries to start in posix mode when started as sh.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
'sh' shell - Actually calls legacy Bourne shell, or uses system default? Dtsazza Linux - Software 1 10-28-2005 09:20 AM
default shell aspargo Linux - Newbie 3 08-09-2004 03:38 AM
How to set a Gnome theme as default for all users and future users ? MDesigner Linux - Newbie 1 06-28-2004 11:12 AM
Konsole's default shell abs Debian 1 10-26-2003 10:15 PM
default shell IBP Linux - Newbie 2 12-21-2002 05:52 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 09:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration