SSH shell prompt does not show user@host for one userHow do I remotely access my ubuntu virtual machine?Graphical ssh private key prompt not showing upWebcam working for admin, not for standard user Ubuntu 12.04Is There A Security Risk With Users That Are Also Groups?ssh command history and “autocomplete”Need run scripts as different users on same host to different hosts without password prompt
What are the econometric assumptions in bayesian statistics?
What is the maximum number of squares 8 queens and 8 nightriders can attack on a 16x16 board?
What type of rhetorical device is the offering of a source which is really long and not specifying what part of the source is relevant?
Horizontally mirror a brainflak program
Why do Muslim refugees seek asylum in Europe and not in rich countries in the Middle East?
Use field calculator QGIS: if value in one column, then value in new column
Why do aircraft sometimes bounce while landing?
Shoe shine shop model in Rust
Why rounding odd font sizes to even?
find a condition on B,C so set difference is associative (AB)C=A(BC)
What DC should I use for someone trying to survive indefinitely solely with an alchemy jug as their only source of food and water? (survival campaign)
Should I report a security vulnerability?
Under international law, can a country partially withdraw from a treaty?
What is the lowest level at which a human can beat the 100m world record (or: the presumed human limit) without using magic?
Are there Drugs which Prevent Unconsciousness?
Am I being run backwards?
Using footnotes in fiction: children's book which can be enjoyed by adults
How to communicate faster than the system clock
How do I solve the problem of “invalid active developer path” when attempting to use Git on VSCode
How to present boolean options along with selecting exactly 1 of them as "primary"?
how to make a twisted wrapper
Does anyone know a basepoint-free construction of universal covers?
unite 3 Circuitikz Topologys into one Tikzpicture
Invalid time zone 'UTC'
SSH shell prompt does not show user@host for one user
How do I remotely access my ubuntu virtual machine?Graphical ssh private key prompt not showing upWebcam working for admin, not for standard user Ubuntu 12.04Is There A Security Risk With Users That Are Also Groups?ssh command history and “autocomplete”Need run scripts as different users on same host to different hosts without password prompt
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty
margin-bottom:0;
I have Ubuntu 12.04 server running. I created user1 when I installed, and created user2 today with '1useradd' and I added it to all the same groups as user1.
But when I log in remotely using SSH, the prompt for user1 looks like this:
user1@host:~$
And the prompt for user2 looks like this:
$
Most importantly, the shell doesn't behave as nicely as I'm used to when I'm logged in as user2. There is no autocomplete of commands or files with tab, and I can't access the MRU with up.
ssh users
add a comment
|
I have Ubuntu 12.04 server running. I created user1 when I installed, and created user2 today with '1useradd' and I added it to all the same groups as user1.
But when I log in remotely using SSH, the prompt for user1 looks like this:
user1@host:~$
And the prompt for user2 looks like this:
$
Most importantly, the shell doesn't behave as nicely as I'm used to when I'm logged in as user2. There is no autocomplete of commands or files with tab, and I can't access the MRU with up.
ssh users
BetweenadduseranduseraddI always useadduser, it is the recommended "high level" routine, which also can/will create useful defaults for the new user, whereasuseraddonly generates the user and does nothing else.
– guntbert
Jun 9 '13 at 20:33
add a comment
|
I have Ubuntu 12.04 server running. I created user1 when I installed, and created user2 today with '1useradd' and I added it to all the same groups as user1.
But when I log in remotely using SSH, the prompt for user1 looks like this:
user1@host:~$
And the prompt for user2 looks like this:
$
Most importantly, the shell doesn't behave as nicely as I'm used to when I'm logged in as user2. There is no autocomplete of commands or files with tab, and I can't access the MRU with up.
ssh users
I have Ubuntu 12.04 server running. I created user1 when I installed, and created user2 today with '1useradd' and I added it to all the same groups as user1.
But when I log in remotely using SSH, the prompt for user1 looks like this:
user1@host:~$
And the prompt for user2 looks like this:
$
Most importantly, the shell doesn't behave as nicely as I'm used to when I'm logged in as user2. There is no autocomplete of commands or files with tab, and I can't access the MRU with up.
ssh users
ssh users
asked Jun 9 '13 at 16:18
BillBill
1821 gold badge1 silver badge10 bronze badges
1821 gold badge1 silver badge10 bronze badges
BetweenadduseranduseraddI always useadduser, it is the recommended "high level" routine, which also can/will create useful defaults for the new user, whereasuseraddonly generates the user and does nothing else.
– guntbert
Jun 9 '13 at 20:33
add a comment
|
BetweenadduseranduseraddI always useadduser, it is the recommended "high level" routine, which also can/will create useful defaults for the new user, whereasuseraddonly generates the user and does nothing else.
– guntbert
Jun 9 '13 at 20:33
Between
adduser and useradd I always use adduser, it is the recommended "high level" routine, which also can/will create useful defaults for the new user, whereas useradd only generates the user and does nothing else.– guntbert
Jun 9 '13 at 20:33
Between
adduser and useradd I always use adduser, it is the recommended "high level" routine, which also can/will create useful defaults for the new user, whereas useradd only generates the user and does nothing else.– guntbert
Jun 9 '13 at 20:33
add a comment
|
3 Answers
3
active
oldest
votes
It is because their shell is set to /bin/sh, and not /bin/bash. You can use the program chsh (CHange SHell) to change that user's shell. When you're logged in as that user, run:
chsh /bin/bash
I would recommend against editing /etc/passwd manually as you could accidentally enter a syntactically wrong line in to it (without realising), which might break logins for other users.
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
1
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
add a comment
|
Note: Use the method in the update, it's safer than manually editing passwd file.
the useradd command apparently sets /bin/sh as the default shell (which in turn is linked to /bin/dash). Try editing /etc/passwd and change /bin/sh to /bin/bash for user2.
In the future, use adduser instead.
UDPATE:
As @Scott suggested below, instead of editing /etc/passwd use the chsh command:
chsh /bin/bash
Source: http://the-hydra.blogspot.com.ar/2012/03/useradd-and-adduser-are-same-think.html
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
1
What @Scott says is true. I forgot thechshcommand. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!
– martintama
Jun 9 '13 at 17:14
add a comment
|
While chsh gets the job done, just like one would modify several other aspects of a user, the usermod command is your friend:
usermod -s /bin/bash user
It is the editing counterpart of useradd.
add a comment
|
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "89"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f306137%2fssh-shell-prompt-does-not-show-userhost-for-one-user%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
It is because their shell is set to /bin/sh, and not /bin/bash. You can use the program chsh (CHange SHell) to change that user's shell. When you're logged in as that user, run:
chsh /bin/bash
I would recommend against editing /etc/passwd manually as you could accidentally enter a syntactically wrong line in to it (without realising), which might break logins for other users.
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
1
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
add a comment
|
It is because their shell is set to /bin/sh, and not /bin/bash. You can use the program chsh (CHange SHell) to change that user's shell. When you're logged in as that user, run:
chsh /bin/bash
I would recommend against editing /etc/passwd manually as you could accidentally enter a syntactically wrong line in to it (without realising), which might break logins for other users.
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
1
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
add a comment
|
It is because their shell is set to /bin/sh, and not /bin/bash. You can use the program chsh (CHange SHell) to change that user's shell. When you're logged in as that user, run:
chsh /bin/bash
I would recommend against editing /etc/passwd manually as you could accidentally enter a syntactically wrong line in to it (without realising), which might break logins for other users.
It is because their shell is set to /bin/sh, and not /bin/bash. You can use the program chsh (CHange SHell) to change that user's shell. When you're logged in as that user, run:
chsh /bin/bash
I would recommend against editing /etc/passwd manually as you could accidentally enter a syntactically wrong line in to it (without realising), which might break logins for other users.
answered Jun 9 '13 at 16:49
ScottScott
2501 silver badge3 bronze badges
2501 silver badge3 bronze badges
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
1
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
add a comment
|
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
1
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
I noticed that in /etc/passwd the entries look like: user1:x:1000:1000:user1,,,:/home/user1/bin/bash user2:x:1001:1001::/home/user2:bin/sh Do you know what the user1,,, does? csh didn't seem to change that part.
– Bill
Jun 9 '13 at 17:10
1
1
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
The comma-separated stuff is called Gecos data. It's used for things like room number, telephone number, and some other things. Running adduser actually prompts you for all of this info, but it's largely useless for you if this is just your personal computer. Check out this wiki link for a more complete explanation.
– Scott
Jun 9 '13 at 17:41
add a comment
|
Note: Use the method in the update, it's safer than manually editing passwd file.
the useradd command apparently sets /bin/sh as the default shell (which in turn is linked to /bin/dash). Try editing /etc/passwd and change /bin/sh to /bin/bash for user2.
In the future, use adduser instead.
UDPATE:
As @Scott suggested below, instead of editing /etc/passwd use the chsh command:
chsh /bin/bash
Source: http://the-hydra.blogspot.com.ar/2012/03/useradd-and-adduser-are-same-think.html
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
1
What @Scott says is true. I forgot thechshcommand. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!
– martintama
Jun 9 '13 at 17:14
add a comment
|
Note: Use the method in the update, it's safer than manually editing passwd file.
the useradd command apparently sets /bin/sh as the default shell (which in turn is linked to /bin/dash). Try editing /etc/passwd and change /bin/sh to /bin/bash for user2.
In the future, use adduser instead.
UDPATE:
As @Scott suggested below, instead of editing /etc/passwd use the chsh command:
chsh /bin/bash
Source: http://the-hydra.blogspot.com.ar/2012/03/useradd-and-adduser-are-same-think.html
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
1
What @Scott says is true. I forgot thechshcommand. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!
– martintama
Jun 9 '13 at 17:14
add a comment
|
Note: Use the method in the update, it's safer than manually editing passwd file.
the useradd command apparently sets /bin/sh as the default shell (which in turn is linked to /bin/dash). Try editing /etc/passwd and change /bin/sh to /bin/bash for user2.
In the future, use adduser instead.
UDPATE:
As @Scott suggested below, instead of editing /etc/passwd use the chsh command:
chsh /bin/bash
Source: http://the-hydra.blogspot.com.ar/2012/03/useradd-and-adduser-are-same-think.html
Note: Use the method in the update, it's safer than manually editing passwd file.
the useradd command apparently sets /bin/sh as the default shell (which in turn is linked to /bin/dash). Try editing /etc/passwd and change /bin/sh to /bin/bash for user2.
In the future, use adduser instead.
UDPATE:
As @Scott suggested below, instead of editing /etc/passwd use the chsh command:
chsh /bin/bash
Source: http://the-hydra.blogspot.com.ar/2012/03/useradd-and-adduser-are-same-think.html
edited Jun 9 '13 at 17:19
answered Jun 9 '13 at 16:35
martintamamartintama
1813 bronze badges
1813 bronze badges
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
1
What @Scott says is true. I forgot thechshcommand. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!
– martintama
Jun 9 '13 at 17:14
add a comment
|
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
1
What @Scott says is true. I forgot thechshcommand. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!
– martintama
Jun 9 '13 at 17:14
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
That did it! So funny that useradd and adduser both exist.
– Bill
Jun 9 '13 at 17:06
1
1
What @Scott says is true. I forgot the
chsh command. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!– martintama
Jun 9 '13 at 17:14
What @Scott says is true. I forgot the
chsh command. One should always try to avoid editing system files directly if there's a command that does that for us. Thanks!– martintama
Jun 9 '13 at 17:14
add a comment
|
While chsh gets the job done, just like one would modify several other aspects of a user, the usermod command is your friend:
usermod -s /bin/bash user
It is the editing counterpart of useradd.
add a comment
|
While chsh gets the job done, just like one would modify several other aspects of a user, the usermod command is your friend:
usermod -s /bin/bash user
It is the editing counterpart of useradd.
add a comment
|
While chsh gets the job done, just like one would modify several other aspects of a user, the usermod command is your friend:
usermod -s /bin/bash user
It is the editing counterpart of useradd.
While chsh gets the job done, just like one would modify several other aspects of a user, the usermod command is your friend:
usermod -s /bin/bash user
It is the editing counterpart of useradd.
edited Jul 30 at 14:07
answered Apr 4 at 10:21
Nachbars LumpiNachbars Lumpi
1363 bronze badges
1363 bronze badges
add a comment
|
add a comment
|
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f306137%2fssh-shell-prompt-does-not-show-userhost-for-one-user%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Between
adduseranduseraddI always useadduser, it is the recommended "high level" routine, which also can/will create useful defaults for the new user, whereasuseraddonly generates the user and does nothing else.– guntbert
Jun 9 '13 at 20:33