Questions tagged [useradd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
588 views

groupadd command not working error: 'is not a valid group name'

I re-did the code to something less complicated and now it says: ubuntu@ubuntu-VirtualBox:~$ ./newuseradd.sh Newbies.csv [sudo] password for ubuntu: useradd: group 'acct' does not exist useradd: group ...
user avatar
4 votes
1 answer
606 views

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.
user avatar
0 votes
1 answer
24 views

login as user X rejected

Adding a user like so: sudo useradd juliet -p juliet -s /bin/sh and then typing su - juliet Password: Get the error: su: Authentication failure Why? And how do I change user?
user avatar
  • 299
1 vote
1 answer
1k views

useradd: cannot open /etc/passwd

I am facing create a new user on my ubuntu 20.04 from GUI as well as terminal. I am getting following error: sahadeb@HP-Elite-Book:~$ sudo adduser user1 Adding user `user1' ... Adding new group `user1'...
user avatar
0 votes
0 answers
77 views

Failed to install opendkim in webmin (Ubuntu): "useradd: cannot lock /etc/passwd; try again later."

I tried to install opendkim on the Ubuntu server using the Webmin command line, with the following command: sudo apt-get -y install opendkim opendkim-tools But I encounter a number of errors: Setting ...
user avatar
0 votes
0 answers
38 views

how to create a user in linux that user can only use a text editor

How to create a user in Linux that user can only use a text editor. And if that user exit from the text editor the system automatically shut down
user avatar
-1 votes
2 answers
4k views

Which option needs to be set to create a home directory for a new user using "useradd" command?

My answers: useradd -d useradd -m useradd -m -d username useradd -d -m username sudo useradd -d username and i think i put all the letters from "man useradd"...stil non of the answers there ...
user avatar
0 votes
1 answer
69 views

Howto reset locale-settings for new users system wide to another locale

Installing Ubuntu 20.04 I chose English US as my default language but the keyboard layout as German. One of the next screens presented a world map with timezones to choose from. I clicked into it for ...
user avatar
0 votes
1 answer
157 views

Why is useradd -p option not recommended?

I've read that it is good practice with regards to security to run docker containers as non-root user, so I create a user in my Dockerfile and switch to that user in the end of the Dockerfile: // ...
user avatar
  • 103
1 vote
1 answer
72 views

how to create a guest account without disk encryption password prompted

I'd like to let people use my computer sometime without entering into my session that's usually achieve with guest account, for example using sudo useradd guest and sudo passwd -d guest but my ...
user avatar
  • 113
0 votes
0 answers
254 views

can't login via 'root and ssh keys' after adding non-root user

Ubuntu 20.04 server (on a Digital Ocean droplet) here. I had set up root login with SSH keys, and login password disabled. Everything worked fine. The other day I decided to add a non-root user (...
user avatar
0 votes
0 answers
1k views

How to create user without a password in Ubuntu

I am using Ubuntu 19.10.I want add a system user with a home directory, and the user won't have any login access or password. I want to accomplish this by running useradd without sudo command. I gave ...
user avatar
  • 191
2 votes
1 answer
3k views

useradd -g option doesn't seem to be working

I tried: sudo useradd -s "/bin/false" -g [existingGroupName] [userNameToAdd] After the command I looked it up in /etc/group, but the user is not in the [existingGroupName]. Why is that so?
user avatar
  • 1,039
3 votes
1 answer
7k views

.bashrc and .bash_profile not created with adduser but created with useradd [duplicate]

I am adding a user named 'test' in my Ubuntu 18.04 server. When I add the user using adduser, like this: sudo adduser --system --group test --shell /bin/bash all goes well, I can login fine, but ....
user avatar
  • 33
1 vote
2 answers
1k views

How much disk space is assigned to a new user in ubuntu?

If I create a new user test1 using the adduser/useradd command, how much space does Ubuntu assign to the test1 user? What happens when I have 10 users on my system? Do all of them use the same amount ...
user avatar
1 vote
1 answer
521 views

Running useradd with shell_exec

After trying to give permissions to /etc/passwd, the useradd command wont execute from php's shell_exec(); I also tried to visudo and change passwd's owner, the error is still useradd: Permission ...
user avatar
  • 31
14 votes
2 answers
10k views

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.
user avatar
0 votes
0 answers
54 views

useradd for no home and no loging [duplicate]

I want to make an user that have no home folder and no login ability. sudo useradd -s /bin/false [demouser] I omitted -m parameter since that makes the home folder for the demouser. I did -s /bin/...
user avatar
  • 1,039
11 votes
4 answers
14k views

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 ...
user avatar
3 votes
1 answer
2k views

user created unable to login [duplicate]

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?
user avatar
  • 31
3 votes
1 answer
2k views

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 ...
user avatar
1 vote
0 answers
1k views

How to change the default home directory?

On a server, I have mounted a big drive on /home2 in order to store all the user accounts. Supposedly in order to set the default directory to /home2, we are supposed to edit /etc/default/useradd ...
user avatar
  • 731
2 votes
1 answer
4k views

User is not in passwd and shadow file but when getent passwd user it shows

User is not in /etc/passwd and /etc/shadow file but when I "getent passwd userSec" it shows the account details. [root@myServer systemadmin]# getent passwd userSec userSec:...
user avatar
3 votes
1 answer
173 views

Removing and adding user back again doesn't remove it properly [duplicate]

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 ...
user avatar
  • 143
0 votes
2 answers
666 views

How to add current date or current time stamp to a manual useradd script?

This script I made is manually creating a user by taking in only the name the user wants to use. I'm currently trying to add the current date or current time stamp when the user is created in the ...
user avatar
  • 95
2 votes
1 answer
499 views

useradd ignores defaults in /etc/default/useradd

FTP Migration. Moving the FTP server from Windows to Ubuntu, and rebuilding the storage for FTP on a different server. I'm doing a one time pass to create about 100 users, all with the same password,...
user avatar
  • 121
5 votes
2 answers
3k views

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 ...
user avatar
  • 191
1 vote
2 answers
246 views

Diff between 2 ways changing useradd defaults

I'm trying to change the useradd default shell, so when the next new user created its shell would be /usr/sbin/tcsh. One way doing that is by running the following command : useradd -D -s /usr/...
user avatar
  • 111
0 votes
1 answer
249 views

the system doesn't read .bashrc and .profile of a user in Ubuntu14.04

Recently I added a new user to linux 14.04, user2, but the home directory of user2 is NOT in /home/user2, I've put it in different place, lets call it home2. useradd -d home2 user2 I already had an ...
user avatar
  • 1
0 votes
0 answers
321 views

Unable to login to default account after creating new account in ubuntu 16.04

I was trying to install cassandra in my local machine following this article I created new group and user using the following commands as suggested in the article. root@ubuntu:~# groupadd cassandra ...
user avatar
2 votes
2 answers
105 views

Why do I not have any directory except 'home' with new user? [duplicate]

I created a new non-root user and did the following: useradd -m newusername passwd newusername usermod -a -G sudo newusername chsh -s /bin/bash newusername I need to install software as a non-...
user avatar
1 vote
1 answer
2k views

User add and shell script with password

I know how to use the useradd comand but would like to make a shell script to automate the process so how would I put the users input to the password part which is a dialog presented after I have ...
user avatar
  • 239
-1 votes
1 answer
643 views

Encrypting of /etc/shadow file

When I add a user by -useradd command, if I go to /etc/shadow the password isn't encrypted, and therefore I cannot login to that user. How can I encrypt that password in shadow file?
user avatar
  • 101
1 vote
4 answers
6k views

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 ...
user avatar
11 votes
1 answer
18k views

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 ...
user avatar
  • 393
40 votes
2 answers
107k views

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?
user avatar
1 vote
2 answers
2k views

useradd command in linux not working as expected?

I tried to change default shell in Ubuntu 14.04 using the following command user@MyUbuntu:~$ sudo useradd -D -s /bin/tcsh user@MyUbuntu:~$ sudo useradd -D GROUP=101 HOME=/home INACTIVE=-1 EXPIRE= ...
user avatar
  • 111
18 votes
5 answers
73k views

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 ...
user avatar
1 vote
0 answers
2k views

create multiple users from csv file and communicate them the password

I have to create multiple users in an Ubuntu environment from a csv file that lists their names and password. I am using the following tutorial Import users from CSV file But I am not been able to ...
user avatar
18 votes
5 answers
81k views

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: ...
user avatar
1 vote
3 answers
9k views

How to login with new user and fix error : ": No such file or directory"?

I created a user with root access useradd -ou 0 -g 0 myuser -p [12345] when I try to su to the new user, I get: : No such file or directory when I want to connect as that user via ssh, I get: ...
user avatar
  • 277
1 vote
2 answers
3k 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.
user avatar
0 votes
1 answer
2k views

Unable to create and delete an user account in the PC

When I try to create a new user account with command sudo adduser test-ser, I receive this error: sudo adduser test-user Adding user test-user ... Adding new group test-user (1069) ... Adding new ...
user avatar
1 vote
2 answers
11k views

When to use adduser or useradd [duplicate]

The Question consist of three parts What are the differences between them When to use adduser or useradd and why there is more than one command for the same purpose
user avatar
  • 78.3k
1 vote
1 answer
8k views

How to add user from guest user?

I've installed ubuntu using wubi from windows. I remembered I provided an username and password. But now I can log in only as guest user from where I can't privileges to install or run program. Can ...
user avatar
3 votes
1 answer
17k 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 ...
user avatar
0 votes
3 answers
877 views

Useradd command input

If you add a user using useradd you get asked to supply some other information about the user (Full name, room number, work phone etc). Where exactly is this information being stored? How do you ...
user avatar
0 votes
3 answers
6k views

useradd: cannot lock /etc/subuid; try again later

So, while trying to upgrade to 14.04 I encountered this error: Could not calculate the upgrade An unresolvable problem occurred while calculating the upgrade. Please report this bug against the '...
user avatar
2 votes
0 answers
160 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 ...
user avatar
  • 339
0 votes
1 answer
672 views

sudo useradd wont make home directory

I have an automatic script which works, only it just never makes a home directory. The data is extracted from a database. Heres the script: $SQL -s -e "SELECT uid, password FROM registrations WHERE ...
user avatar