Questions tagged [useradd]

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

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

Is it possible for /etc/skel/.dotfile to have contents changed to match the username?

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
  • 507
0 votes
0 answers
25 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 ...
kix448526's user avatar
0 votes
1 answer
44 views

How does this script actually create the new user's directory structure

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 ...
Root James's user avatar
2 votes
1 answer
103 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 ...
mrdaemon's user avatar
0 votes
0 answers
153 views

useradd --create-home not adding a home directory Rocky Linux 8 but does in CentOS 7

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
  • 103
0 votes
0 answers
245 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 ...
MindHackzQueen's user avatar
0 votes
1 answer
2k views

How do you add a user using --gecos Linux Ubuntu?

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
0 votes
0 answers
74 views

Not able to add user to system with readonly fs in ubuntu linux

According to the requirement I want to add a user to an OS where the / is mounted as readonly. As we know that the OS will not be able to create lock files and edit passwd files the operation fails. ...
parthi_for_tech's user avatar
1 vote
1 answer
249 views

Create a system user without password and home directory on Centos machine

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
0 votes
2 answers
524 views

useradd prompt user to change password at first login

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
304 views

Im having useradd error in arch-linux

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
428 views

Put a specific file in every Unix user's home directory when they're created and added to a particular group

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
633 views

SystemD authentication makes me choose between the same user twice when using "systemctl start *service*"

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
167 views

How to get user creation details

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
101 views

Post-Useradd Script + Gnome Initial Login

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
506 views

useradd -p option [duplicate]

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
  • 65
0 votes
1 answer
104 views

Cannot append user to group

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
  • 1,835
4 votes
1 answer
1k views

Using "useradd" command correctly

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
288 views

How to create a new user and a txt file inside it?

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
7k views

Change default login user for Linux from root

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
  • 21
-1 votes
1 answer
659 views

useradd: group '9001' does not exist

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
1k views

How to set maximum number of users in Linux?

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
  • 315
0 votes
1 answer
828 views

debian (?) - create new user based off of an existing one (copying configs, apps, etc)

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
  • 205
2 votes
1 answer
942 views

Creating a system user in Debian without home directory still creates a non-existent home directory entry in /etc/passwd

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
  • 34.7k
1 vote
1 answer
1k views

How to verify whether a user has a home directory or password?

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
  • 2,500
0 votes
1 answer
354 views

users command does not show recently added users

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
  • 2,500
-1 votes
1 answer
2k views

Check If user exist in /etc/passwd, If exist create new one with prefix

Kinda stuck here, did not found any solutions. Check If user exist in /etc/passwd, If exist create new one with prefix new_the_existed_one #!/bin/bash myuser="/home/yakyak/Desktop/Exercises/...
YakyAK's user avatar
  • 13
0 votes
1 answer
3k views

useradd create a user without password and accessible only by ssh

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
251 views

Creating users with modified home directory and mask [closed]

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'...
Fco Javier Balón's user avatar
0 votes
0 answers
141 views

useradd and user management in Plasma

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
420 views

openssl passwd password only works briefly

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
0 votes
1 answer
3k views

How to avoid getting "sudo: Account or password is expired, reset your password and try again"

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
91 views

How to add user in Unix System 7?

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
2k views

Information of new user won´t show in terminal

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
65 views

Cross Distro way of creating a service user and group?

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
1k views

How to add new Linux user restricted to ssh tunneling with password?

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
66 views

How Does Unix Interpret $? [closed]

[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!?&...
powerhousemethod's user avatar
1 vote
2 answers
1k views

Prompt string not set properly in Bash for new user

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
557 views

adduser: /etc/gshadow.: Structure needs cleaning

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
664 views

Cannot add user with useradd command

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
791 views

Getting a warning I don't understand when trying to useradd with m & d options

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
149 views

When creating new users, how can I incorporarte a sh script to be executed in order to create custom files/directores for the new users?

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 votes
1 answer
803 views

What is the point of a system user?

Ok so when you look at the system user the point of the system user is to run services with minimal permissions, and to have a user that doesn't have a password or ssh. The issue I have with this is ...
bordenE's user avatar
0 votes
0 answers
390 views

How to create user which have permission only specific folders

I need to create user and give only permission to my site folder and apache config folder(read,write,shell).These user should have ssh connection.Can anyone help me please? Distro is Centos 7.
Cebrayil's user avatar
0 votes
1 answer
2k views

Terminal returning: no crontab for user

I create a new user, john. Now I want to programmatically write a cronjob to the user john's crontab. #!/bin/bash #script name: cronbuild.sh cronjob1="0 */3 * * * /home/john/ad_dev/modem_dog.sh&...
Beaker's user avatar
  • 67
0 votes
0 answers
40 views

Prevent deb installation from creating new accounts

We are configuring a variety of servers programmatically, and we periodically need to be able to migrate volumes from one server to another. After migrating a volume, we are currently executing chown ...
Brandon's user avatar
  • 101
1 vote
0 answers
678 views

How can I set up my Linux server to permit password login for sftp only, and require public private key for ssh?

I have a Linux server which I have configured to login with public private key for my account - and it works well. It's a long time since I set it up, so I can't remember what steps I took - but it's ...
headbanger's user avatar
1 vote
2 answers
3k views

User can't login in lightdm only root can

I've installed arch, and lighDM with awesome window manager. Everything runs okay.If I login as root, awesome load and works but if I login with the user I've created it attemps to log, clean te ...
ExpectoPatrom's user avatar
30 votes
3 answers
113k views

bash: adduser: command not found [Debian Buster]

Question: What is the most-ideal way to add new users in Debian? adduser appears to be missing on my system, any tips? Log: bash: adduser: command not found Edit: adduser does appear to be ...
Jefferysons's user avatar
1 vote
1 answer
37 views

User Creation From Web Server

I'm creating a web app which will allow me to setup shared hosting environments. Everything has to be done programmatically and i'm questioning whether i'm approaching things in a completely insecure ...
Mark Hill's user avatar

1
2 3 4 5