Skip to main content

Questions tagged [useradd]

The `useradd` command is used to create new users on a system.

Filter by
Sorted by
Tagged with
2 votes
1 answer
90 views

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 ...
py-php's user avatar
  • 71
0 votes
2 answers
158 views

Need to create user www-data in group ubuntu to make NGINX to serve a website. /etc/passwd file: www-data:x:33:33:www-data:/var/www:/usr/sbin/nologin ubuntu:x:1000:1000:ubuntu:/home/ubuntu:/bin/bash ...
jurijus01's user avatar
9 votes
1 answer
1k views

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: ...
machinist's user avatar
  • 335
0 votes
0 answers
53 views

I would like to add a user in an SD image with an ARM Linux. Since my host computer is x86, I cannot just chroot into the mounted image. Is there a way to add a user to a filesystem at a relative path,...
xealits's user avatar
  • 2,291
0 votes
2 answers
73 views

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 ...
spinosarus123's user avatar
0 votes
1 answer
131 views

I am trying to add a user account to my remote server (running on Ubuntu 22.04) via SSH using below script: #!/bin/bash protect="y" ssh -i ssh_key [email protected] <<END sudo deluser ...
dzboot02's user avatar
  • 103
0 votes
2 answers
78 views

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(...
Sekots Reivan's user avatar
0 votes
2 answers
203 views

I'm trying to create a user with first and last name and home directory in Users/username, with an expiration date, inactive, with a default UID and GID in the DKEL_dir /etc/skel2. This is what I ran ...
Jonathan Spires's user avatar
0 votes
0 answers
194 views

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 (...
ridderhoff's user avatar
0 votes
0 answers
71 views

I want to create a ~/.nanorc file with a default backupdir path for each user: set backup set backupdir /var/nanobackup/username Does this have to be customized after I create a new user or does /etc/...
Paul's user avatar
  • 537
1 vote
0 answers
90 views

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 ...
kix448526's user avatar
0 votes
1 answer
100 views

I'm looking at the bash script included below. It accepts a couple of command line arguments and creates a .deb package that, when executed, using the sudo dpkg -i created-file.deb command, a new ...
I'm Root James's user avatar
2 votes
1 answer
810 views

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 ...
mrdaemon's user avatar
0 votes
0 answers
531 views

I have an RPM that runs a scriptlet to add a user and create a home directory. I have used this before on CentOS 7, but now need this RPM to run it on Rocky Linux 8 so I've rebuilt the RPM (it's ...
Dave's user avatar
  • 113
0 votes
0 answers
803 views

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 ...
MindHackzQueen's user avatar
0 votes
1 answer
10k views

I am trying to create a script that adds a user, but I have to do it in a non-interactive way without the default prompts of the adduser command. The instructions I have state that I should use --...
NewCoderBH1694's user avatar
1 vote
1 answer
789 views

I want to create system user without password and home directory. I found some similar solution but not properly get my answer. I am using a centos machine. in ubuntu: adduser mprobe --disabled-...
user547301's user avatar
1 vote
2 answers
2k views

what option should I add to my useradd command such that when the user logs in for the first time he's prompted to change the password or something? I was thinking about this, but not sure if it's the ...
Professor Seemo's user avatar
1 vote
1 answer
706 views

Im installing arch-linux for the first time and im following a video on youtube and im creating a non root user with the command '' 'useradd -G wheel.audio.video - m nour11''' But im getting the error ...
Whoknows's user avatar
4 votes
1 answer
690 views

How can I set up my Solaris system so that every time a user is created and assigned to a specific group, a specific file is placed in that user's home directory?
Nestor's user avatar
  • 41
1 vote
2 answers
2k views

I deleted and re-added my user, and now when I use systemctl start/stop service, it prompts me to choose to authenticate between two users, both being the same user. How do I fix this? This is what it ...
Paleski's user avatar
  • 11
-1 votes
1 answer
296 views

Kindly assist to to get user creation details (date and time) and users login details in Solaris 10
eliot's user avatar
  • 31
0 votes
1 answer
249 views

I have a script at /etc/shadow-maint/useradd-post.d/ that takes a created username, gets their UID, adds one and prints :##=username to the end of /etc/tigervnc/vncserver.users, as well as writes a ...
nepher ki3den's user avatar
0 votes
1 answer
1k views

I can't understand the purpose of -p option in 'useradd' Let's create a user useradd -m -p 'pass1' user1 after running the command above, when trying to log in using su - user1 authentication fails....
mehrdad's user avatar
  • 75
0 votes
1 answer
195 views

I'm having trouble adding a user to a group: # useradd -aG group user # useradd -a -G group user # useradd -G group user --append It tells me that the -a option is an invalid or unrecognized. Can ...
telometto's user avatar
  • 2,221
4 votes
1 answer
2k views

On Ubuntu 20.04, I am trying to add a user, however, it keeps failing. I don't see anything wrong and going crazy over a simple useradd command! What am I doing wrong? root@myhost:~# uname -a Linux ...
Ufder's user avatar
  • 149
0 votes
1 answer
507 views

I need to write a bash-script that will create a new user named user1 and an empty file my_txt.txt in ~user1/tmp/ . The problem is terminal asks the password for new user and i don't know how to ...
Axmed's user avatar
  • 1
1 vote
2 answers
16k views

I've been working with Linux for awhile and was wondering how I could go about changing the default login user. The whole time I've used Ubuntu, I've been logging in as the root node, as bad as that ...
Cani687's user avatar
  • 31
-1 votes
1 answer
990 views

i am trying to run the command: root@minimanode:/# sudo wget -O minima_setup.sh https://raw.githubusercontent.com/minima-global/Minima/master/scripts/minima_setup.sh && chmod +x minima_setup....
JopaBoga's user avatar
2 votes
1 answer
3k views

For example, let's say that I want a maximum of 3 users. How can I make sure that no more than 3 users can be created?
Fred's user avatar
  • 345
0 votes
1 answer
2k views

What I want to achieve: Use an established user to create multiple new users each of which with identical starting set ups, same applications (e.g. Slack), same configurations (e.g. conda installed ...
SumNeuron's user avatar
  • 215
3 votes
1 answer
4k views

I'm trying to create a system user in Debian, with no home directory, for use with getmail. Even though I did: adduser --system --group --no-create-home getmail The entry in /etc/passwd is: getmail:x:...
Faheem Mitha's user avatar
  • 36.1k
1 vote
1 answer
2k views

Where can I find details on how a user was created. And what is the current status of a user. For example, adduser command can be run with --no-create-home, --disabled-password, --home DIR etc. Is ...
Ahmad Ismail's user avatar
  • 3,134
0 votes
1 answer
704 views

I have created few users: sudo useradd bart sudo useradd marge sudo useradd lisa sudo useradd maggie These users now exist $ awk -F: '{ print $1}' /etc/passwd blueray bart marge lisa maggie However ...
Ahmad Ismail's user avatar
  • 3,134
0 votes
1 answer
3k views

Kinda stuck here, did not find any solution. Check if user exists in /etc/passwd, if they exist, create new one with prefix new_the_existed_one #!/bin/bash myuser="/home/yakyak/Desktop/Exercises/...
YakyAK's user avatar
  • 23
1 vote
1 answer
8k views

I'm writing a script that automatically creates a user using the useradd command (I need this one and not adduser). I want to create it in a way that it is accessible only using ssh (the script ...
AndreaCostanzo1's user avatar
-3 votes
1 answer
405 views

I need to create 6 new users (one, two, three, four, five and six) with passwords, two of these (five and six) must have their personal directories modified (using skelo or configuration files, I don'...
Francisco de Javier's user avatar
0 votes
0 answers
286 views

I added a user in the terminal useradd -m -g <groupID> -u <userID> <username> Now, going to the user management of KDE I tried to change the name of the account (NOT the user name), ...
pawel_winzig's user avatar
0 votes
0 answers
1k views

I am having a strange issue setting up linux VM instances. Please forgive me if this is basic, I am not a linux systems programmer (usually). I am trying to script the launching of 20+ linux ...
Seth Lutske's user avatar
1 vote
2 answers
6k views

I am trying to add user e.g. amit to group amit,as below. root# groupadd -g 1500 -f amit root# useradd amit -m -G sudo -u 1500 -g 1500 -o -p "amit" However, ...
Pravin.2087's user avatar
0 votes
1 answer
212 views

I have created a Unix System 7 VM in VirtualBox following instructions by Robert Nordier. I have dropped to the single user prompt (#). I can run commands like ls and passwd and cat. However, useradd ...
GunJack's user avatar
  • 111
1 vote
2 answers
3k views

I created a new user and logged in successfully on my ubuntu 20.04 machine. When I logged in as root the terminal looks like this: root@ubuntu-s-1vcpu-1gb-fra1-01:~# When I login with my "...
Data Mastery's user avatar
0 votes
1 answer
152 views

On Debian/Ubuntu systems I can use the following line to create a user and group named "dv" just for usage on a daemon service (systemd). No SSH login, no password, no home directory etc: ...
Kukulkan's user avatar
0 votes
1 answer
2k views

I wanted to create a new user on my linux server so that he can access my postgres database through an ssh tunnel. However, I want him to restrict his access only to the ssh tunnel. I followed these ...
JoeBe's user avatar
  • 101
-8 votes
2 answers
76 views

[orca@orcacomputers public_html]$ adduser Jé$$è+rèè adduser: invalid user name 'Jé28956è+rèè' I am unable to use $ when adding users in CentOS7. Karen goes "WHY THE HELL WOULD YOU DO THAT!?&...
mister mcdoogle's user avatar
1 vote
2 answers
2k views

I'm using Kali Linux for one of my classes, and part of our first assignment is to create a custom user account using our names instead of the default kali login, however when I do this it messes with ...
Jeffrey Carr's user avatar
0 votes
0 answers
648 views

I am getting the following error when I try to add a new user sh-4.2$ sudo adduser mbyousaf adduser: /etc/gshadow.1341: Structure needs cleaning adduser: cannot lock /etc/gshadow; try again later. I ...
Bilal Yousaf's user avatar
0 votes
1 answer
993 views

I am on CentOS 8.2 and I'm unable to add an user using the useradd command [root@localhost ~]# useradd -m /home/alice -c "ALICE ADMIN" -s /usr/bin/bash alice Usage: useradd [options] LOGIN ...
Pranav Pednekar's user avatar
1 vote
1 answer
1k views

I'm trying to add a new user, "abc", with a home directory of "/test/abc", for him, using the useradd command on an Ubuntu machine as follows: useradd abc -md /test/abc and ...
Charles's user avatar
  • 11
0 votes
0 answers
222 views

I want to run a script with sudo privileges when a new user is added to my system. More specifically, whenever I create a new user (with useradd or adduser), I want to be able to create a folder ...
ricardo3889's user avatar

1
2 3 4 5