LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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 03-16-2011, 09:14 PM   #1
malayo
Member
 
Registered: Dec 2010
Posts: 124

Rep: Reputation: 1
set new user to use bash


when i created new user with
# useradd -m newuser

and logged in as newuser, i cannot have the autocompletion that the first user have. Why? How do i set newuser to use bash and the same for all other user?
 
Old 03-16-2011, 09:21 PM   #2
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
man useradd
Quote:
useradd is a low level utility for adding users. On Debian, administrators should usually use adduser(8) instead.
Usually, with adduser, it gets done automatically. Which exact files are used for that i would not know (out of the top of my head). If that does not work neither, which i doubt, ask again.

Last edited by j1alu; 03-16-2011 at 09:22 PM.
 
Old 03-16-2011, 10:22 PM   #3
MBybee
Member
 
Registered: Jan 2009
Location: wherever I can make a living
Distribution: PC-BSD / FreeBSD / Debian / Ubuntu / Win7 / OpenVMS
Posts: 438

Rep: Reputation: 57
Depending on your distro, try "usermod -s /bin/bash newuser" or whatever the path is to bash on your system.

To create a new user that already defaults to bash, just specify the "-s /bin/bash" with the useradd

http://linux.die.net/man/8/usermod
http://linux.die.net/man/8/useradd

Oh, and it's stored in /etc/passwd - but it's better not to edit that manually unless you know what you're doing.
 
Old 03-16-2011, 11:51 PM   #4
malayo
Member
 
Registered: Dec 2010
Posts: 124

Original Poster
Rep: Reputation: 1
# usermod -s /bin/bash newuser

did not work but disabling dash for that user does
$ sudo dpkg-reconfigure dash

and choose No
 
Old 03-17-2011, 05:41 AM   #5
j1alu
Member
 
Registered: Apr 2009
Distribution: debian gnu/linux
Posts: 798

Rep: Reputation: Disabled
Code:
ROOT# ls -l /bin/sh
lrwxrwxrwx 1 root root 4 Mar 14 08:01 /bin/sh -> dash
ROOT# adduser test-user
Adding user `test-user' ...
Adding new group `test-user' (1001) ...
Adding new user `test-user' (1001) with group `test-user' ...
Creating home directory `/home/test-user' ...
Copying files from `/etc/skel' ...
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Changing the user information for test-user
Enter the new value, or press ENTER for the default
	Full Name []: duh
	Room Number []: dah
	Work Phone []: doh
	Home Phone []: uff
	Other []: no
Is the information correct? [Y/n] y
ROOT# su - test-user
test-user@debian-laptop:/usr/share/icons/Cylon/devices$ echo $SHELL
/bin/bash
test-user@debian-laptop:/usr/share/icons/Cylon/devices$

Last edited by j1alu; 03-17-2011 at 05:45 AM.
 
1 members found this post helpful.
Old 03-17-2011, 06:34 AM   #6
malayo
Member
 
Registered: Dec 2010
Posts: 124

Original Poster
Rep: Reputation: 1
i'll remember to use adduser instead next time
 
  


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
How do I set a real system user in ProFTP to set to a specific directory? j.smith1981 Linux - Server 27 12-14-2010 08:32 AM
[SOLVED] bash set bbb125 Linux - Newbie 3 08-15-2010 08:10 PM
super user privileges check for a normal user in bash script freeindy Programming 2 08-01-2008 06:08 AM
Set group id,set user id? JAKK Slackware 3 06-15-2006 10:16 PM
How to view set-user-ID and set-group-ID Xris718 Linux - General 7 01-10-2004 01:44 PM


All times are GMT -5. The time now is 01:13 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