Questions tagged [useradd]
The useradd tag has no usage guidance.
71
questions
0
votes
1
answer
44
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 ...
0
votes
1
answer
36
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 ...
0
votes
0
answers
63
views
Create new users with a default group
I want to create a new user with a group called gfirt with a guid 1111. Firstly, I did groupadd -g 1111 gfirt. Then I add the user test creating a home directory and setting the password. The result ...
0
votes
0
answers
83
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 "...
0
votes
0
answers
46
views
How to provide a ssh user access to server from a limited number of machines?
I have an ubuntu 22.04 server. I have defined a few users to have ssh access over password to my server. I want to limit their access to server to the number of their machine. For example user A only ...
0
votes
0
answers
74
views
Ubuntu user groups : Permission denied
I have admin user , root user and one other user 'www',
I'm using 'www' user for Nginx based solutions, its non admin user. User id 1001.
I have enable ssh login for 'www' user cause for change file ...
0
votes
1
answer
177
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 ...
1
vote
0
answers
154
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 ...
0
votes
0
answers
51
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 ...
1
vote
0
answers
60
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-...
0
votes
0
answers
160
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 ...
0
votes
0
answers
29
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 ...
5
votes
3
answers
2k
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 /...
0
votes
1
answer
2k
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 ...
5
votes
1
answer
1k
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.
0
votes
1
answer
108
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?
1
vote
1
answer
3k
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'...
0
votes
0
answers
161
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 ...
0
votes
0
answers
58
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
-1
votes
3
answers
8k
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 ...
0
votes
1
answer
376
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 ...
0
votes
1
answer
412
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:
// ...
1
vote
1
answer
85
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 ...
0
votes
0
answers
334
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 (...
0
votes
0
answers
3k
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 ...
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?
3
votes
1
answer
10k
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 ....
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 ...
1
vote
1
answer
696
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 ...
14
votes
2
answers
12k
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.
0
votes
0
answers
59
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/...
11
votes
4
answers
18k
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 ...
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?
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 ...
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
...
2
votes
1
answer
5k
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:...
3
votes
1
answer
210
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 ...
0
votes
2
answers
720
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 ...
2
votes
1
answer
801
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,...
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 ...
1
vote
2
answers
560
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/...
0
votes
1
answer
362
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 ...
0
votes
0
answers
352
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
...
2
votes
2
answers
115
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-...
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 ...
-1
votes
1
answer
706
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?
2
votes
5
answers
10k
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 ...
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 ...
48
votes
2
answers
133k
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?
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=
...