Questions tagged [useradd]
71 questions
610
votes
10 answers
What is the difference between adduser and useradd?
What is the difference between the commands adduser and useradd on Ubuntu?
Joe Cabezas
- 6,253
- 3
- 15
- 7
48
votes
2 answers
what is the default password when you create new user in ubuntu?
I have created a new user by using useradd command e.g.:
sudo useradd acreddy
Then new user is created but it is asking for a password what is the password?
a-c-sreedhar-reddy
- 657
- 1
- 5
- 9
30
votes
3 answers
Cannot login to newly created user account
Trying to switch accounts to my newly created account I get a black screen and then it takes me back to the main login screen after entering the correct password.
Upon logging into my previously existing account I get:
"System Program Problem…
penner
- 571
- 1
- 8
- 15
25
votes
5 answers
password does not work with useradd -p
I am running ubuntu 14.04 LTS. I ran the following command to create a user
$sudo useradd -m -p password1 guest_user
and then tried to switch to the user with
$su guest_user
But i could not login with password1
Am i missing something? Am i…
user2065276
- 371
- 1
- 3
- 6
18
votes
5 answers
Ubuntu 14.04: New user created from command line has missing features
I am trying to create a new user in Ubuntu 14.04 LTS from the bash command line. I use the following commands:
sudo useradd -c "Samwise the Brave" sam
sudo passwd sam
Enter new UNIX password: hello-1234
Retype new UNIX password:…
martin_0004
- 993
- 5
- 11
- 19
14
votes
2 answers
Difference between adduser and usermod -G -a
What is the difference between
adduser user_name group_name
and
usermod -G -a user_name group_name
At first glance they seems to do the same thing : add a user to a group.
snoob dogg
- 240
- 1
- 2
- 10
13
votes
1 answer
How to create new user with Public key authentication?
I have Ubuntu Server 14.04 LTS. I have Public key authentication enabled by default.
I used the following command to create new user:
sudo useradd -m -c "John T." john -s /bin/bash
The command apparently created user, user's home folder... but…
Maris B.
- 433
- 2
- 6
- 17
11
votes
4 answers
programmatically clone /etc/skel for new users
/etc/skel is a folder that will be cloned for new users. Is there a possible way that we can define rules what to copy from /etc/skel folder?
For example, I'm looking for a way that if a user is created and belongs to group named A, clone /etc/skel…
Nam Nguyen
- 281
- 1
- 3
- 5
5
votes
2 answers
How to add System user that not be shown in lightdm login screen window or User Accounts?
I want to create an user with no login, no home and that not be shown in lightdm login screen window or User Accounts tool. Just like others users in /etc/passwd: sshd, syslog, avahi...
I've tried with this command line:
useradd -r -u 1001 -M -g…
rssh22
- 191
- 1
- 2
- 5
5
votes
3 answers
useradd creates home directory owned by root
I'm using the following command to create a user and home directory, but for some reason, the newly created home directory is owned by root:
useradd --user-group --create-home --base-dir /opt --shell /bin/bash testuser
I'm creating a Docker image…
bacham23
- 51
- 2
5
votes
1 answer
What's the difference between the -d and -m options for useradd?
When we use useradd, what is the difference between -d and -m? Because the definitions of both sound similar, which is responsible for creating a home directory.
shaunx333
- 79
- 5
4
votes
1 answer
useradd: cannot lock /etc/passwd; try again later
Trying to add a user:
useradd -c "test" -d /home/bbbbbbbb -e "01-jan-2013"
-f 10 -g admin -p secretfgjdhdgd -s /bin/bash -u 123456 blobblob
but getting:
useradd: cannot lock /etc/passwd; try again later.
Michael Durrant
- 10,666
- 21
- 60
- 81
3
votes
1 answer
user created unable to login
I created a user in terminal by
useradd xyz
I'm able to log in from the terminal but not in the GUI.
What is wrong?
mairaj
- 31
- 2
3
votes
1 answer
Running as a host user within a Docker container
In my team we use Docker containers to locally run our website applications while we do development on them.
Assuming I'm working on a Flask app at app.py with dependencies in requirements.txt, a working flow would look roughly like this:
# I am…
Robin Winslow
- 2,606
- 3
- 19
- 25
3
votes
1 answer
Removing and adding user back again doesn't remove it properly
If I, as a root user, add user milos, then the system asks me to provide some info, which I do.
When I, after that, userdel milos, it removes it and removes milos group.
Now, if I'm to useradd milos again, it doesn't ask me for a user password nor…
Milos
- 143
- 5