adduser and addgroup are friendlier front ends to useradd, groupadd and usermod.

learn more… | top users | synonyms

197
votes
6answers
182k views

What is the difference between adduser and useradd?

What is the difference between the commands adduser and useradd?
91
votes
2answers
31k views

Run adduser non-interactively

I'd like to use the adduser command to add a user (with disabled password) via a shell script. By default, adduser prompts you for various values (e.g., Full Name). Is there any way to submit these ...
59
votes
3answers
205k views

How can I create an administrator user from the command line?

I want to create a user with administrative privileges and all the regular setups like home directory. Is there a adduser parameter to give the user sudo powers automatically? What are the default ...
35
votes
5answers
104k views

How to make user home folder after account creation?

I created a new user with useradd name and forgot to use -d -m to create their home directory. I tried making one, copying the contents of /etc/skel, and chowning everything to the new user. ...
17
votes
1answer
838 views

“Admin” user automatically has sudo privileges

I added a user named "admin" to my Ubuntu 14.04LTS server, using adduser. I'm used to having to add a user to the /etc/sudoers file when adding a new user that needs sudo privileges, but this time I ...
15
votes
2answers
35k views

How do you change the default shell for ALL USERS to bash?

I want every new user from now on to have bash as their shell by default. I know that to change your own shell to bash, you would use the command "chsh -s /bin/bash", but how do I automatically set ...
9
votes
3answers
25k views

Proper way to add a user account via bash script

Here's the script code I'm using now: getent group $MYGROUP if [ $? -ne 0 ] ; then sudo su -c "groupadd $MYGROUP" fi sudo su -c "useradd mynewuser -p mypassword -m -g $PRIMARYGRP -G $MYGROUP" ...
7
votes
3answers
19k views

“Failed to create user” due to regular expression error

I'm running Ubuntu 12.10 desktop 32 bit. Currently I have only a user, type administrator. I'd like to create another administrator user but I keep getting the following error: Failed to create ...
7
votes
1answer
3k views

When I create a new user, how do I automatically create a .virtualenvs directory in their home directory?

I want to automatically create a directory called ".virtualenvs" in each new user's home directory upon creation of that new user. I am using the useradd command to create new users.
6
votes
2answers
49k views

Adding a new user on Ubuntu server

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@...
6
votes
2answers
393 views

Corrupted /etc/adduser.conf

My /etc/adduser.conf file got corrupted: $ less /etc/adduser.conf "/etc/adduser.conf" may be a binary file. See it anyway? How can I reinstall a fresh copy?
6
votes
1answer
7k views

What do the `--disabled-login` and `--gecos` options of `adduser` command stand for?

Running Ubuntu 12.04, I setup a private git server and created a group called git some time ago. Now I am following a guide to install gitlab and when it came to adding a user to the git group and ...
6
votes
1answer
50k views

Create the home directory while creating a user [duplicate]

I have added user using the adduser command, but a directory with is new user name is not created in /home, and I'm also not able to run any command with this user. After logging from this user it's ...
5
votes
2answers
32k views

adduser says user exists when the user does not exist

As the subject says, I'm trying to add a new user. When I run the command, it says the user already exists. But looking in /etc/passwd, /etc/group, and /etc/shadow shows that the user does not exist. ...
5
votes
2answers
8k views

Is it necessary to reboot after changing group membership?

I would like to know, why it is required to reboot, to apply the changes, which I made. I refer to the use of adduser username sudo I use Ubuntu 12.04.1 LTS "Server".
5
votes
1answer
8k views

How to remove user from Ubuntu?

I added group using the command in terminal as, $ sudo addgroup XXX And I add user under that group, $ sudo adduser --ingroup XXX YYY Now, I need to remove the same group as well as user(s), how ...
5
votes
1answer
386 views

What can a user do without sudo?

I'm setting up a server and want a user to only have access to his own files. I do a regular adduser command: sudo adduser username And give the user a password. Then I log in to it via ssh and see ...
4
votes
2answers
9k views

How does “Accounts Service” work with lightdm?

I have added two users using the command useradd but they do no show up in the lightdm/unity-greeter login screen. So there is no way to graphically login for them. It seems Accounts Service (...
4
votes
3answers
763 views

How can I create a new user with the equivalent of a Windows guest-user's permissions?

Basically, I want the new user to have only a few permissions -- can't read the normal users' home directories, can only read or write files to one directory (can only read or write /home/user/... can ...
3
votes
2answers
11k views

How to add a user to Ubuntu 12.04

This is very weird, when add a user using the command line then set a password I cant login using the GUI! is this a new thing or what?
3
votes
1answer
1k views

Locale warning while executing adduser

I just tried to add an user to a group $ adduser someuser sudo perl: warning: Setting locale failed. perl: warning: Please check that your locale settings: LANGUAGE = "en_US:en", LC_ALL = (...
3
votes
2answers
5k views

Problems creating a new user in Ubuntu

I am experimenting with nginx+uswgi+Flask and am following this tutorial. However when I get to the portion for creating a new user for uswgi I am having troubles. When I enter the command from the ...
3
votes
0answers
456 views

Problem when creating aditional users [closed]

I just upgraded to ubuntu 11.04. I've no issues with creating users, but if they login an error occurs. For example, when I create the user "luli" and login with that user, I got the error: Could ...
2
votes
2answers
16k views

How do I add or delete user accounts?

How do I add or delete user accounts in Ubuntu? I know that the "useradd" command could be used to do this, but I hear that Ubuntu has some other command-line tool and some GUI somewhere, either one ...
2
votes
4answers
736 views

adduser.conf NAME_REGEX is not working

I am trying to set a rule for new users. I changed the /etc/adduser.conf file by adding the line: NAME_REGEX="[A-Z]{1}[a-z]{5,9}$" but after that, the system is not accepting any user.. always ...
2
votes
1answer
11k views

“Could not chdir to home directory /home/me: No such file or directory” [duplicate]

I am using 12.04 on my server. I created a new user using adduser me and passwd me and added it to sudo when I login this is what I see. Could not chdir to home directory /home/me: No such file or ...
2
votes
2answers
678 views

Confused about groups and adduser

I have written a script to add chrooted sFTP users. The useradd command is: sudo useradd -Ng sftponly -ms /bin/false "$USER" Did it work? groups $USER $USER : sftponly Yes it did. Great! Then ...
2
votes
2answers
1k views

why is there no name showing at the command line?

a hopefully simple one here, I don't know why there's no username at the $ when a new account is added and you login? Welcome to Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-23-generic-pae i686) * ...
2
votes
2answers
206 views

How to secure system users which only runs application processes?

I created a system user through adduser command for use in an application I installed. This user is supposed to run application-specific processes and such (think of postgres system user doing nothing ...
2
votes
1answer
266 views

Home folder doesn't update or show newly added users

I am having a very big problem and that is, whenever I add a new user (via command line with adduser krishna command) the user is created but it's home folder or it's own private folder isn't created ...
2
votes
2answers
93 views

Automate user creation [closed]

I have a site for my students, and it is running on Ubuntu 14.04. When my students register themselves on my site, I store user info in an MySQL DB. I would like to give my students a website on my ...
2
votes
1answer
4k views

How to add user from apache user group in linux

The question is simple. How we can add user without root privileges (because www-data is very important for security)? For example adding user with root user: sudo adduser user group Without root ...
2
votes
2answers
104 views

When you create user using adduser what happens on the system?

I see that /home/user folder is created. /etc/passwd file has an entry with non bin/false or bin/nologin shells. /etc/group has user group. /etc/shadow has the password. Is there something else ...
2
votes
1answer
2k views

Not able to create user on Ubuntu 14.04 (32 bit)

I'm sorry this post is so long, but I wanted to make sure that all the stuff that might be relevant was readily available. I've been trying to create a new user account on my laptop, and, even though ...
2
votes
0answers
101 views

How to create multiple users during installation?

Now these days I am working on a Ubuntu customization project. In which I want to add this feature that Customizes OS can be able to create 2 users automatically during the installation. User can be ...
2
votes
2answers
164 views

Not able to login into newly created user account

I created a new user account from System Settings > User Accounts. I can log in to new user account from the terminal but I can't log in to user account from GUI. When I try to log in to the newly ...
1
vote
2answers
75 views

Is adding a user needs password [duplicate]

In my Ubuntu after login by my user account, I want to create another user I intered bellow commands : adduser alex_2 -m I created new user, but when I want to login, Ubuntu needs passwords and I ...
1
vote
2answers
115 views

I'm unable to add password to newly created user

I just created a new account with Administrator privileges but cannot set up the password to activate account. I don't know how to set-up the account password via terminal.
1
vote
2answers
4k views

How to create a new user without home directory and with specific UID

How can I add a new user "Kids" with UID = 500 and without home directory with adduser command in terminal? I'm trying this: sudo adduser --no-create-home --uid ID 500 Kids and after correctly ...
1
vote
4answers
635 views

Simplest way to set up new user with SSH access on remote host, given root access

I am writing a tutorial on setting up Ceph the hard way, shell all the way. I am not happy with the number of ssh commands it takes to connect to a remote host as root, create new user, then scp keys ...
1
vote
1answer
2k views

How to create Maildir on user creation?

How do I make the adduser script create the appropriate Maildir directory of the new user? I have an Ubuntu server running postfix. When I first installed it was deliverying emails to /var/mail/<...
1
vote
1answer
4k views

Adduser: group sudo does not exist

I am able to login to my account but can't do anything related to superuser now. Updates, sharing, sudo and all things say authentication failed. I tried to correct that by going in recovery mode and ...
1
vote
1answer
491 views

What is the right way to gain sudo privileges [duplicate]

I have just created a new Rackspace cloud server and I need to set it up. I created a new user with the adduser command and currently the user is only in a group with the same name. For the sudo ...
1
vote
1answer
153 views

Set or determine the UID range for guest accounts

For a special purpose it seems like I need to know the UID (user ID) of my guest accounts. As guest accounts are created and (usually) removed automatically whenever one is needed, the UIDs are not ...
1
vote
1answer
2k views

“Warnings” while creating user with adduser

While creating a system user using adduser, it responded with a lot of entries like the following: myser@machine:~$ sudo adduser --system backup_user Adding system user `backup_user' (UID 108) ... ...
1
vote
1answer
66 views

Changed suoders to an account that doesn't exist, what should I do

I've installed ubuntu 12.04 with single user, let's call him user1. I then created a new user, let's call him user2. I wanted user2 to be the only user with sudo rights, so I removed all users from ...
1
vote
1answer
8k views

Installing FTP and adding user to FTP account

I installed ftp on a ubuntu server and now want to add a user. I am using this tutorial : http://www.debian-administration.org/articles/383 Everything was working fine but I stuck on the step of ...
1
vote
1answer
210 views

Admin name appears twice if it asks for admin password. Ubuntu 12.04 LTS

I was trying to apply some given items at this page to secure my Ubuntu 12,04. After applying item number 4; my user name which is the only admin, appears twice if system asks for an admin password as ...
1
vote
1answer
136 views

Fresh installation and user's management

I have Ubuntu 10.10 that works perfect for me and my family. Now I would like to install a fresh 12.10 release. I have a separated /home partition. After installing a new version, I need to configure ...
1
vote
1answer
39 views

Accidentally created another root user. How to delete or change permissions?

I need a non-root user to do certain (safe) things. I didn't pay attention, and used useradd -ou 0 -g 0 new_user_name, which gave root permissions to the user. It also has the same UID of 0. Before ...