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;









4

















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.










share|improve this question


























  • 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

















4

















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.










share|improve this question


























  • 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













4












4








4


4






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.










share|improve this question















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






share|improve this question














share|improve this question











share|improve this question




share|improve this question










asked Jun 9 '13 at 16:18









BillBill

1821 gold badge1 silver badge10 bronze badges




1821 gold badge1 silver badge10 bronze badges















  • 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
















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










3 Answers
3






active

oldest

votes


















7


















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.






share|improve this answer


























  • 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



















6


















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






share|improve this answer




























  • 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 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


















1


















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.






share|improve this answer





























    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
    );



    );














    draft saved

    draft discarded
















    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









    7


















    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.






    share|improve this answer


























    • 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
















    7


















    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.






    share|improve this answer


























    • 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














    7














    7










    7









    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.






    share|improve this answer














    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.







    share|improve this answer













    share|improve this answer




    share|improve this answer










    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


















    • 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














    6


















    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






    share|improve this answer




























    • 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 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















    6


















    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






    share|improve this answer




























    • 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 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













    6














    6










    6









    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






    share|improve this answer
















    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







    share|improve this answer















    share|improve this answer




    share|improve this answer








    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 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

















    • 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 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
















    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











    1


















    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.






    share|improve this answer
































      1


















      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.






      share|improve this answer






























        1














        1










        1









        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.






        share|improve this answer
















        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.







        share|improve this answer















        share|improve this answer




        share|improve this answer








        edited Jul 30 at 14:07

























        answered Apr 4 at 10:21









        Nachbars LumpiNachbars Lumpi

        1363 bronze badges




        1363 bronze badges































            draft saved

            draft discarded















































            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.




            draft saved


            draft discarded














            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





















































            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









            Popular posts from this blog

            Distance measures on a map of a game The 2019 Stack Overflow Developer Survey Results Are Inmin distance in a graphShortest distance path on contour plotHow to plot a tilted map?Finding points outside of a diskDelaunay link distanceAnnulus from GeoDisks: drawing a ring on a mapNegative Correlation DistanceFind distance along a path (GPS coordinates)Finding position at given distance in a GeoPathMathematics behind distance estimation using camera

            How to get a smooth, uniform ParametricPlot of a 2D Region?How to plot a complicated Region?How to exclude a region from ParametricPlotHow discretize a region placing vertices on a specific non-uniform gridHow to transform a Plot or a ParametricPlot into a RegionHow can I get a smooth plot of a bounded region?Smooth ParametricPlot3D with RegionFunction?Smooth border of a region ParametricPlotSmooth region boundarySmooth region plot from list of pointsGet minimum y of a certain x in a region

            Genealogie vun de Merowenger Vum Merowech bis zum Chilperich I. | Navigatiounsmenü