Questions tagged [useradd]
The `useradd` command is used to create new users on a system.
240 questions
2 votes
1 answer
89 views
How to do the same as 'useradd -l' for an existing user?
As far as I understand https://unix.stackexchange.com/a/84960/771338, useradd --no-log-init modifies the lastlog file to prevent a user from appearing in lastlog. I have two questions about this: Is ...
9 votes
1 answer
1k views
adduser allows weak password - how to prevent?
I want to enforce my password policy to both new users and existing ones, but when I run adduser on Ubuntu 24, it allows me to add a weak password. $ sudo adduser handsm [sudo] password for superuser: ...
0 votes
2 answers
71 views
When to useradd
I'm writing a daemon in C which needs to do some things as a separate user from root. I will call this user "testuser". My program is installed by its makefile. My question is thus, when ...
0 votes
2 answers
73 views
File Permission of a User with No Additional Groups
Using a Rocky Linux server, I created a user using the following command, sudo adduser foobar and user foobar is now a member of group foobar. We can confirm with the following. foobar$ id uid=1111(...
0 votes
0 answers
194 views
Restart systemd service when new user created
I need to restart a systemd service (running as root) every time a new user is created. I saw that some systems have a way to make an adduser hook but this isn't an option in RHEL8. What is the best (...
1 vote
0 answers
89 views
Why doesn't openSUSE GUI allow one letter usernames during first install?
I burned the openSUSE Tumbleweed iso on USB and plugged it into a laptop to try it out. I ran the gui installer. When asked to choose a username I typed q in the username. However I was unable to ...
2 votes
1 answer
804 views
useradd --prefix option
If I'm not mistaken, the --prefix option of useradd should allow me to change the etc files from the directory I select, but it strangely adds an extra /. I'm using Linux Mint 21.1 mate 64bit version ...
0 votes
0 answers
800 views
Linux- How to set default values for future new users and create an empty file that is copied to each new users home directory?
In Linux on my Virtual Box, How do I set default values for any future new user? Also, how do I create an empty file named TESTFILE and have it copied to each new users home directory. I believe I did ...