Ubuntu – Adding a new user on Ubuntu server

adduserserver

I have been trying to add a new user. I typed in adduser then username and also tried useradd then username. It does seem to add a user, but when I login I only get a dollar sign instead of user@servername. I have tried adding rules to allow me into the sudo for that username, but why do I only get the dollar sign?

Best Answer

  • You might have either accidentally used "useradd" instead of "adduser" - which adds the user, but does not set up a profile for him/her - or you might be missing the "skeleton" files in /etc/skel which normally set up a default user account.

    Please do sudo userdel username (where username is the name of the account you're creating), then sudo adduser username and post the output here. You SHOULD get something like the following:

    me@banshee:~$ sudo adduser noob
    Adding user `noob' ...
    Adding new group `noob' (1005) ...
    Adding new user `noob' (1005) with group `noob' ...
    Creating home directory `/home/noob' ...
    Copying files from `/etc/skel' ...
    Enter new UNIX password: 
    Retype new UNIX password: 
    Changing the user information for noob
    Enter the new value, or press ENTER for the default
        Full Name []: 
        Room Number []: 
        Work Phone []: 
        Home Phone []: 
        Other []: 
    Is the information correct? [Y/n] 
    

    If you do all that and the user still does not get a full prompt, then you're missing some files from /etc/skel - please post back, and we can help further. I think you just accidentally used useradd instead of adduser, though, which does not do ANY of the above stuff - it just creates a system account and that's it, no homedir, no nothing.

  • Related Question