Questions tagged [useradd]

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

Filter by
Sorted by
Tagged with
-1
votes
2answers
528 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 ...
1
vote
1answer
18 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 ...
0
votes
0answers
19 views

adduser performs differently with the --disable-password

I am writing a shell script to add a user to the linux system. The intent is to pass via cmd arg, the username and generate a strong password in the script. Then I would email the password to them. ...
0
votes
1answer
71 views

How create a folder owned by specific username & groupname?

In mac groupadd command does not work: After $ sudo mkdir -p /a/b, a$ ls -l total 0 drwxr-xr-x 2 root wheel 64 12 Jan 09:46 b a$ pwd /a a$ a$ a$ uname -a Darwin user01vl 18.7.0 Darwin Kernel ...
0
votes
1answer
121 views

Using `useradd -R` for chrooting

If I got it right, chroot restricts user's access to a given directory only. Looks like useradd has this option (Debian 10). # useradd --help | grep "chroot" -R, --root CHROOT_DIR directory ...
0
votes
1answer
25 views

Is there any difference between first user account and after then the account created?

When i first set up my linux desktop it asked me to add a user account . After then i was learning linux commands using this account. I then add some more users using "useradd" command. Now i eager ...
0
votes
1answer
57 views

useradd account cant login through GUI

I'm using KALI fresh install. Linux kali 5.2.0-kali2-686-pae #1 SMP Debian 5.2.9-2kali1 (2019-08-22) i686 GNU/Linux I created a user using useradd akkilah Then i added this user to sudo group ...
1
vote
1answer
51 views

Create Unicode Login In *Unix

I want to create Unicode logins for *Unix flavor OS, when i use useradd like below, I got that user name is invalid [root@mail ~]# useradd ياسين useradd: invalid user name 'ياسين
0
votes
1answer
99 views

Add new user without password but not disabled

I need to add new users who are only supposed to be usable through SSH. When adding a user, they get added to the shadow file with an exclamation mark (!) instead of an asterisk (*), so they are "...
0
votes
0answers
50 views

How can i duplicate a user including all the configurations and settings to a new username?

I already have root access since the computer is my personal property. It runs a recent version of a major Linux distribution. I want to create a new user that is an identical copy of an existing ...
-2
votes
1answer
41 views

Sudoers permissions to new user that only allow “useradd and usermod”

I want to create a new user and I want this user to be allowed to only run "useradd" and "usermod" Will I need to configure the sudoers file? Not sure how to go about this.
3
votes
2answers
222 views

Verbose useradd in Red Hat Enterprise Linux

I'm trying to output the result of "useradd" to a logfile, but unfortunately there is no verbose option. For example: "useradd dude" has no output, unless the user already exists. I would like to do ...
1
vote
0answers
14 views

unable to boot directly to desktop environment

I tried to change a user's login name with usermod --login krypton maddybut now everytime I reboot my pc, it doesn't directly shows the desktop environment and I need to do Ctrl+Alt+F2 and then startx ...
2
votes
1answer
53 views

What are reasons for organising /home with initial-letter subdirs (ie LETTERHOMES)?

On my home Linux, a user named toto will have its home in /home/toto. On the system at my high school, such an user would be in /home/t/toto. I understand this is due to the configuration of ...
1
vote
1answer
337 views

Primary and secondary group of a user

Why is it that group1 which should be user's primary group, is in the subgroups? The user is not even part of group1 in /etc/group file. # id user uid=1000(user) gid=1111(group1) groups=1111(group1),...
7
votes
2answers
777 views

What is the use of option -o in the useradd command?

What is the use of option -o for command useradd? What is a good use case of this option?
3
votes
1answer
368 views

empty /etc/skel still adds default directories

I am using elementary freya and creating a new user with root# useradd -s /bin/bash -mk /etc/skel -d /home/secret -c otherme agentb24 and my /etc/skel is empty and I also want my new user home to be ...
0
votes
2answers
40 views

Trying to script with 'useradd', can't understand examples

I am trying to use useradd. I found an example of something I'd like to try and incorporate, though I can't understand specific parts. Here is the example in entirety: if [ $(id -u) -eq 0 ]; then ...
2
votes
1answer
41 views

Solaris 5.10 shell replacement for Centos 7 migration

I have an old Solaris 5.10 server. I'm migrating the tomcat products to Centos 7. There are two accounts on the Solaris server that I need to migrate. The shells for both of those accounts are ...
0
votes
0answers
100 views

User entries not deleting in lastlog file in Solaris

I am deleting a user in Solaris 10 and 11.  If I delete a user using the command userdel -r test1 and then check my lastlog file /export/home/ch185140/lastlog, I get output like this: 1 tj100201 ...
1
vote
0answers
86 views

Why my newly created user is not inheriting $PATH variable

I added a new user dev on my Alpine based image. After switching to the new user I see env variables are different in case of both root and dev user. Specially $PATH variable is different. But I think ...
5
votes
3answers
1k views

Newly created user on Ubuntu Server has the wrong shell prompt

I've created a new user in the Ubuntu 18.04.01 like this: sudo useradd svn sudo passwd svn sudo mkhomedir_helper svn sudo usermod -d /home/svn -m svn Problem is, that if I switch to the user by su ...
-1
votes
1answer
836 views

SVN Installation and adding user

I installed SVN in my linux server a year back by following some documentation online and I created two users to my svn repository. I need to add few more users to my repository and I completely ...
2
votes
1answer
611 views

adduser Firstname.Lastname

I tried to use both useradd and adduser to get a username typed as Firstname.Lastname. I tried also installing libuser and using luseradd, but also I got error. Is there a way to do that (of course it ...
-3
votes
1answer
171 views

What files are created when using useradd [closed]

Which files will be created when using the command useradd ? I know that it will modify /etc/passwd, /etc/group, and /etc/shadow and that it copies home/skel to the user's home directory. I want to ...
0
votes
1answer
228 views

useradd with no options

When I create a user with useradd (no option) I can later add his passwd by using passwd new_user. How can I create his correct home directory (with Desktop and Templates inside) and all other ...
0
votes
1answer
141 views

Why passwd prohibits me from setting “simple” password?

I used console command passwd to change my own password that I set straight after the OS installation with useradd command. My original password contained only line characters, without capitalization, ...
1
vote
1answer
64 views

Setting up VM login instead of Local login [closed]

I had a question earlier, it is tied into this, that one was looking for the proper procedure, this one is looking how to implement. If you need a backstory refer to My first question I have a local ...
0
votes
1answer
662 views

ssh with new user failing with Permission denied (publickey)

I am trying to create user on EC2, following are the steps I performed. root$ adduser abc --disabled-password root$ sudo su abc abc$ mkdir /home/abc/.ssh abc$ chmod 700 /home/abc/.ssh abc$ touch /...
0
votes
1answer
385 views

Give default path for id_rsa in a shell script

I want to automate user creation along with the rsa key generation in a shell script. But while generating the rsa key we need to give inputs for these three things. Enter file in which to save the ...
0
votes
0answers
133 views

How to configure which characters are allowed in CentOS usernames

In systems such as Debian, there is a file /etc/adduser.conf which includes directive NAME_REGEX that can be used to define which characters are allowed in a username. Is there a way to do this in ...
6
votes
2answers
792 views

adduser has no difference from useradd

When I use the adduser command on fedora, it's not aksing for password or fullname. It's working exactly like useradd. I don't understand why. [hugues@localhost ~]$ sudo adduser user1 [hugues@...
-4
votes
1answer
564 views

unix, adding users to existing directory in centos

I'm trying to add users to an existing directory but I keep getting: useradd: warning: the home directory already exists. Not copying any file from skel directory into it. I want to add users to ...
1
vote
0answers
295 views

Debian 9 - useradd

Here is an extract of /etc/default/useradd: GROUP=1005 Here is an extract of /etc/login.defs: USERGROUPS_ENAB no Here is the useradd command I run to create a user: $ sudo useradd test22 $ id -a ...
0
votes
1answer
143 views

How can I automate adding a new user, using an existing user's groups?

Raspberry pi comes with a default user account that is added to multiple groups: username@hostname:~ $ groups pi pi : pi adm dialout cdrom sudo audio video plugdev games users input netdev spi i2c ...
0
votes
3answers
27k views

How to create user and password in one script for 100+ users

I have written a script for adding and setting password for 100+ users. Eg: for setting password of the user I want to set in "user+123" format for all the users I.e user will change according to the ...
0
votes
2answers
1k views

Can I userdel a user without removing their home directory?

I did the following: useradd -d /home/iauser -m -s /bin/bash -c "IA User" iauser got this error: UX: useradd: ERROR: Create home directory failed. Operation not applicable It created an entry in ...
1
vote
1answer
141 views

Basic useradd question

I added one user with myname(prashant) but i had not set any password for same user account. Still when i reboot(runlevel5), i os asked mi for password for same user account. I tried to login with ...
0
votes
1answer
545 views

Can I write a template for creating a new user?

The command useradd new will create the /home/new directory. Is there a way to create the /home/new and /home/new/check directories when useradd new is executed? I don't want to write two ...
4
votes
1answer
994 views

ArchLinux | Login password does not work after creating new user account

I am trying Arch Linux for learning more stuff faster and not having GUI that bothers me, so that I can focus on learning stuff from Linux itself and the terminal. Since I was working with the default ...
1
vote
0answers
940 views

389 ldap client authentication issue [CENTOS 7]

I have created posix group and posix account also able to successfully authenticate client but client unable to change the password. The error is password change failed: Confidentiality required``...
1
vote
1answer
898 views

Adding multiple user accounts on different primary/secondary groups

I am trying to create several user accounts with different groups in an imx6 board. Currently, no users are created in the device. Hence, I see 1000:1000 as my default user:group ID. The scenario I ...
2
votes
1answer
918 views

How to set password for a user using hash in /etc/shadow on Solaris

As part of a new build, I am tasked with creating user accounts on new Solaris server. I have to use the user accounts in an existing Linux server, and set the same password for each user on the ...
0
votes
1answer
446 views

Linux determines a user's first time login [closed]

I am working with an embedded Linux system not related to any standard Linux distro like ubuntu or centos. The system utilizes many standard FOSS packages like systemd, busybox, shadow, etc.. The user ...
0
votes
1answer
933 views

In CentOS7 how to allow email address with adduser command?

In ubuntu it is possible to use the following: sudo adduser --force-badname john.smith@example.com This allows adding an email address as a username. The --force-badname option doesn't work in ...
3
votes
1answer
828 views

Reserving a range of anonymous UIDs; /etc/subuid

I need a range of uids (say a few thousand) for a setuid-root tool to use. Is there a protocol to registering such a range or do I just pick a range and hope no other program will use those uids? (I'...
1
vote
1answer
1k views

Password issue when adding user

I have run the command sudo useradd testuser Then when I run su testuser it ask for a password, and I have not set a password. So no matter what I type it gives me an authentication failure... ...
0
votes
1answer
2k views

What is the default SHA512 salt used in passwd and for the hash stored in the shadow file?

I want to add a user using useradd and specify an encrypted password using the -p flag. I learned that the unix system that I am on uses a SHA512 hash for storing passwords in the /etc/shadow file. ...
2
votes
1answer
919 views

Parsing through a CSV file to add users

I'm having trouble parsing through a CSV file to add users. I wrote a small script to add a list of 1000 users: export IFS="," cat users.csv | while read a b c d e f g; do useradd -d -u $a -U $d ; ...
6
votes
2answers
13k views

useradd: cannot create directory

A CentOS 7 server needs to have a new user created with a specific home directory and shell defined as follows, taken from the instructions at this link: sudo /usr/sbin/useradd --create-home --home-...