Questions tagged [useradd]
71 questions
640
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,553
54
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?
32
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
- 591
- 1
- 8
- 15
28
votes
6 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
- 401
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
- 1,063
- 5
- 12
- 19
15
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
- 258
- 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.
- 453
- 2
- 7
- 17
12
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
- 301
7
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
- 71
6
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
- 81
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
4
votes
7 answers
How do I encrypt a new user's password using the useradd command?
I would like to create an encrypted login password for a new user while using the useradd command in the CLI. I know that using option -p will allow me to create a password, but using this option does not encrypt the password. I also know that I can…
Charlie D
- 49
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
- 11,076
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
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,646
- 3
- 21
- 26