Saturday, May 4, 2024
 Popular · Latest · Hot · Upcoming
8
rated 0 times [  8] [ 0]  / answers: 1 / hits: 20011  / 2 Years ago, thu, december 2, 2021, 12:49:51

I create a normal user account in ubuntu using "useradd" command, but the problem is that I have to type "bash" to launch the bash shell for this user account in both the console mode (in a tty, through ctrl+alt+Fn) and the remote mode (via ssh). The most important part of bash shell for me is the auto-completion function, so my question is that how I could make the bash shell launch automatically when logging into the account.



I use ubuntu 13.04 32bit version. I appreciate for any advice!


More From » bash

 Answers
3

First of all, check if useradd shows a default value for SHELL. To do that, issue:



useradd -D


This will output something like:



GROUP=100
HOME=/home
INACTIVE=-1
EXPIRE=
SHELL=/bin/sh
SKEL=/etc/skel
CREATE_MAIL_SPOOL=no


These values are taken from /etc/default/useradd. Now, you have 2 solutions:




  1. Edit /etc/default/useradd, and change the value of SHELL, or

  2. Override the shell's value when adding user with: useradd -D -s /bin/bash



For more information see man useradd.


[#26035] Thursday, December 2, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ameatoes

Total Points: 321
Total Questions: 106
Total Answers: 112

Location: Belarus
Member since Sat, Jul 18, 2020
4 Years ago
ameatoes questions
Tue, Aug 16, 22, 22:50, 2 Years ago
Fri, May 14, 21, 03:36, 3 Years ago
Sat, Oct 8, 22, 01:00, 2 Years ago
Fri, Feb 17, 23, 14:44, 1 Year ago
;