Skip to main content

Questions tagged [useradd]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
38 views

useradd: group '' does not exist when using -g to define primary group upon user creation

I'm following the exploratory exercises from https://learning.lpi.org/en/learning-materials/010-160/5/5.2/5.2_01/ and according to them this should work yet, when I try this on ubuntu 22.04 ,brand ...
Francisco Cortes's user avatar
1 vote
0 answers
22 views

Not able to launch FIrefox on a new user account

I created a new user in the root account using the sudo useradd jdoe -c "John Doe" -s /bin/sh -d /home/jdoe I was able to create the profile but when I go to open Firefox nothing happens. I ...
Orion's user avatar
  • 11
0 votes
1 answer
268 views

Ubuntu22.04: useradd don't work as expected

I setup a factory new ubuntu 22.04. I run useradd test1, there is no home directory created. I run useradd -m test2, there is home directory with ~/.bashrc and some other environment files. But the ...
Bryan Chen's user avatar
0 votes
1 answer
264 views

Set UID range for specific GUID

I created some groups and I want to create some users to specific guid. It will something like this: group1 with uid from 1000 to 1500 group2 with uid from 2000 to 2500 group3 with uid from 3000 to ...
Mario_7626's user avatar
0 votes
0 answers
225 views

Useradd Default Groups in 22.04

I'm working on building some new servers with 22.04. I use Ansible to create users, and noticed that when creating a new user, for example "test", the user's default group is now the "...
spikeypanda48's user avatar
0 votes
1 answer
281 views

Creating a Linux server user with specific public SSH key

I'd like to provision some new personal accounts on the Ubuntu Linux server. I know how to create user accounts with root, useradd and then how to manually set their authorized_keys file. However is ...
Mikko Ohtamaa's user avatar
1 vote
0 answers
254 views

useradd Problem with /etc/default/useradd ubuntu 22.04

Hi i have problem with useradd conf file /etc/default/useradd. I change some vaule at the end of file for example: GROUP=100 HOME=/users INACTIVE=40 EXPIRE=4 SKEL=/etc/skel CREATE_MAIL_SPOOL=yes none ...
Dany's user avatar
  • 79
0 votes
0 answers
67 views

Ubuntu 20.04 name user add problem Bug #1927078

A problem occurred while upgrading the version of the Ubuntu system from 18.04 to 20.04. 18.04 user name For example, the user who was using 9128323 cannot log in in 20.04. (GUI only) 9128323 is a ...
Hyeok Ji's user avatar
1 vote
0 answers
77 views

How does Ubuntu change the fonts and icon theme for every user?

I know how I can manually change the theme and appearance settings using dconf & the user shell themes extension for a single user, how to theme GDM using dconf & /usr/share/gnome-shell/gnome-...
schuelermine's user avatar
0 votes
0 answers
391 views

provision additional user accounts during autoinstall?

Is it possible to provision multiple user accounts (eg. security scanning accounts) during autoinstall? The primary account gets created with user-data: identity: hostname: useful password: hash ...
Lee Butler's user avatar
0 votes
0 answers
30 views

New user has 2 issues: 1st it runs the 'new user config' every time and can't move icons on/off favorites

I created a new user through Settings->User (Ubuntu 22.04.1 LTS) on some (I have 6) new devices it seemed to work fine, on others it actually has 3 problems: 1st it runs the 'new user config' every ...
Kevin Stringer's user avatar
6 votes
3 answers
4k views

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 /...
bacham23's user avatar
0 votes
1 answer
3k 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 ...
AnneBright's user avatar
5 votes
1 answer
2k 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.
shaunx333's user avatar
0 votes
1 answer
131 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
1 vote
2 answers
4k 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'...
sahadeb barman's user avatar
0 votes
0 answers
230 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 ...
איש נחמד's user avatar
0 votes
0 answers
82 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
Mohamed Ali's user avatar
-2 votes
3 answers
10k 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 ...
ionescu valy's user avatar
0 votes
1 answer
624 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 ...
kcbehler's user avatar
  • 101
0 votes
1 answer
561 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: // ...
YoavKlein's user avatar
  • 125
1 vote
1 answer
91 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 ...
hugogogo's user avatar
  • 143
0 votes
0 answers
345 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 (...
thanks_in_advance's user avatar
0 votes
0 answers
4k 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 ...
alper's user avatar
  • 222
2 votes
1 answer
4k 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?
Smile's user avatar
  • 1,109
3 votes
1 answer
11k 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 ....
Adithya's user avatar
  • 33
1 vote
2 answers
2k 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 ...
N Randhawa's user avatar
1 vote
1 answer
729 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 ...
BusyLM's user avatar
  • 31
15 votes
2 answers
14k 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.
snoob dogg's user avatar
0 votes
0 answers
60 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/...
Smile's user avatar
  • 1,109
12 votes
4 answers
20k 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 ...
Nam Nguyen's 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?
mairaj's 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 ...
Robin Winslow's user avatar
1 vote
0 answers
2k 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 ...
Dov's user avatar
  • 811
3 votes
1 answer
6k 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:...
carlregencia's user avatar
3 votes
1 answer
263 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 ...
errorous's user avatar
  • 143
0 votes
2 answers
732 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 ...
Danny's user avatar
  • 95
2 votes
1 answer
952 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,...
Crimius's user avatar
  • 121
5 votes
2 answers
4k 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 ...
rssh22's user avatar
  • 191
1 vote
2 answers
801 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/...
NI6's user avatar
  • 111
0 votes
1 answer
370 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 ...
mounaf's user avatar
  • 1
0 votes
0 answers
364 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 ...
user593401's user avatar
2 votes
2 answers
126 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-...
DevOpsSauce's 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 ...
Jhondoe's user avatar
  • 239
-1 votes
1 answer
764 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?
YaserMow's user avatar
  • 194
3 votes
6 answers
13k 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 ...
Charlie D's user avatar
13 votes
1 answer
19k 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 ...
Maris B.'s user avatar
  • 443
51 votes
2 answers
148k 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?
a-c-sreedhar-reddy's user avatar
1 vote
2 answers
3k 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= ...
Cody's user avatar
  • 111
28 votes
5 answers
99k 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 ...
user2065276's user avatar