Questions tagged [useradd]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
8 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
46 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
29 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
589 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
277 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
28 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
36 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
57 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
65 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
491 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
419 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 ...
-4
votes
1answer
102 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
198 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
134 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
36 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
365 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
234 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
108 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
681 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
441 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
224 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
78 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
18k 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
656 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
120 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
403 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
834 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
792 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
705 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
713 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
376 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
710 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
655 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
720 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
703 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 ; ...
5
votes
2answers
10k 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-...
1
vote
1answer
4k views

su: User not known to the underlying authentication module

I created a new user in linux by running useradd command: david@machineA:~> sudo useradd golden david@machineA:~> sudo su - golden Creating directory '/home/golden'. $ ^C $ exit su: User not ...
2
votes
2answers
1k views

How to create several root-like and non_root-like linux users [duplicate]

I have a red-hat system with its root and non-root users. I have to create n new root-like users and m new non-root users. Basically I have to clone the 2 kind of users already present on the server. ...
2
votes
1answer
40 views

How are new user IDs calculated automatically by default in Linux?

Basic Linux users are by default identified using some (positive?) numerical ID and at least some years ago there was no "magic" available to keep track of formerly used IDs in case of e.g. user ...
4
votes
1answer
2k views

How to automatically create an empty directory when new user is created?

I'm trying to make it so when I create a new user either by using useradd or adduser, an empty directory named "whatever" is automatically created under that user's home directory. I've tried ...
1
vote
0answers
106 views

How to create a restricted User and install and run Services with it? [closed]

I am new to Linux. I want to create a development server (Gitlab/Tomcat,...) I have already installed Ubuntu 16.10 LTS I have read in forums that it is wise to create special users without login ...
0
votes
2answers
638 views

Creating a working bash script that auto creates admin users in linux

The script below is what I have tried already but it still asked me for the user's password and other information when it ran. #!/bin/bash PASSWORD="somepassword" USERNAME="default" if id -u "$...
1
vote
0answers
263 views

Add user as web-admin CentOS Linux 7

First of all, I'm a newwbie on Linux and CentOS. My webserver is on CentOS Linux 7 and different sites/domains under: /home/username/www/site1 /home/username/www/site2 Where "username" is my ...
0
votes
3answers
469 views

Iterate through text file and add users

I have a list of users I want to add as users to my server (userlist.txt). I want to add them using useradd and include their name as a comment so... every line of the file contains something like ...
1
vote
1answer
11k views

Useradd command not found [duplicate]

I'm trying to make a script where it makes a test user with a home dir and the rights he needs but everytime I run the script I get the following error: /home/thomas/Scripts/CreateUser.sh: line 2: ...
0
votes
2answers
1k views

useradd where account name is a number

Can I use useradd in SLES 11 where a username is just a number (didn't see anything in the man useradd(8) )? currently getting: useradd: Invalid account name: `9999' The alternative is manually ...
2
votes
0answers
664 views

ssh fails with “could not find home directory” (which exists and has permissions) even while a local terminal logs the same user in

I have a bizarre problem where ssh does not find a home directory for some users (that exists), yet the same user can login directly on my machine via a local terminal. Details follow: I maintain a ...
2
votes
1answer
107 views

Unlock user without giving a password for key usage

I'd like to setup a new user in raspbian Jessie that does not have a password and is only accessible with the correct SSH key to have a very secure of using SSH to connect to the Pi. The commands ...