Questions tagged [useradd]

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

Filter by
Sorted by
Tagged with
0
votes
1answer
400 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 ...
2
votes
1answer
2k views

useradd does not work [closed]

On a server running Solaris 10, the command useradd fails to add new users. Running useradd -m creates the home directories but all with user id 50011. Please review the output below: # useradd -s /...
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
790 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
704 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
710 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
374 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 ...
70
votes
3answers
66k views

What does adduser do that useradd doesn't?

In addition to the more widespread useradd, Debian based systems also contain an additional adduser command which provides a higher level interface for adding users and some related tasks. There are ...
0
votes
1answer
703 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 ...
6
votes
2answers
2k views

Can not create SFTP user Debian 7

I have a linode and I access via ssh throw terminal. I need to create an sftp user which his default directory (and the only he can access) is /var/www/xxxxxx.com/public_html/directory Now, I did it, ...
3
votes
1answer
653 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
718 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... ...
14
votes
3answers
31k views

How to set umask for a system-user?

Is it possible to set the umask for a system-user (created with useradd --system username)?
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. ...
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 ...
20
votes
1answer
1k views

Why is /etc/shadow shortening the password that I've set with the command: useradd -p?

[root@P-dude dude]# useradd -p $6$Ic2PVlwi$2nf.IRWTMy0FHrPzaCjkahfu9IIxnzxPZL7yg8SsvOdbjEpoI0G8uy7AqduYKQOn2R/rnnaalRmfPMy.a0 bwong20 [root@P-dude dude]# cat /etc/shadow | grep pswayze pswayze:nf....
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 ...
1
vote
1answer
12k views

What variables are valid within /etc/default/useradd file?

My /etc/default/useradd file is as follow: # useradd defaults file GROUP=100 HOME=/home INACTIVE=-1 EXPIRE= SHELL=/bin/bash SKEL=/etc/skel CREATE_MAIL_SPOOL=yes man page for useradd provides many ...
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
468 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
10k 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
663 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 ...
0
votes
1answer
563 views

useradd cannot execute / not owner error

I have Solaris 9. When running useradd as root i have this error. #/usr/sbin/useradd ksh: /usr/sbin/useradd : cannot exceute Then tried change shell csh and sh but to no avail. csh: # /usr/sbin/...
1
vote
2answers
291 views

I created a new group & new user. I then added the user to the group. How can I change to that user?

I created a new group called tomcat and then created a new user called tomcat that I added to group tomcat: sudo groupadd tomcat sudo useradd -s /bin/false -g tomcat -d /opt/tomcat tomcat whoami ...
1
vote
2answers
125 views

Seeking a script that can loop ssh to a list of ips and perform useradd, home directory, creation and the user to the sudoers file

I have been looking all over for a simple way to combine various scripts to do this. I am not the strongest at scripting but I am working on improving so go easy on me. Any assistance here is ...
-1
votes
3answers
2k views

Error when I want to create a user on FreeBSD

I'm trying to run FreeBSD (.iso) in a virtual VMWare machine. The useradd command gives me an error: # useradd pstnc useradd: Command not found Why is that? The command is correct and very simple, ...
9
votes
1answer
6k views

Implications creating System Accounts “useradd -r” Linux Fedora/RHEL/CentOS

I want to know what are the implications of create an account using -r option? # useradd -r ... The help says: -r, --system Create a system account. System users will be created with no aging ...
4
votes
2answers
3k views

Default shell not being selected with useradd

I have a fresh version of Ubuntu 16.04.1 installed and have tried to create a new user account through root. I have changed the SHELL line in /etc/default/useradd to read as follows: SHELL=/bin/bash ...
1
vote
0answers
28 views

Unable to add users [duplicate]

When I try to adduser or useradd it says command is "not found". Some sources suggest adding /usr/sbin to PATH, but it's already there. Some sources suggest first logging on as root, but su returns "...
0
votes
1answer
1k views

Creating user with bash script with arguments

I am trying to make a script that will make a (s)ftp user, but it keeps failing and i don' t know why. If i echo the command its fine, and i can copy and paste it to create the user, but if i execute ...
0
votes
2answers
1k views

Bash - How to shorten username in PS1

Currently my prompt is: xiaobai@dnxb:/tmp$ root@dnxb:/tmp# My desired prompt: xb@dnxb:/tmp$ rt@dnxb:/tmp# My idea is alias of username, so i tried reuse the same uid to create a new user: ...
1
vote
2answers
10k views

Trying to add user to group that exists in /etc/group not working

I'm trying to add a list of users to different groups on a debian VM. I am using the following sequence of commands in my bash script: getent group $uid || groupadd $uid #add ...
1
vote
2answers
1k views

Arch with XFCE & SDDM: New user doesn't get a full desktop environment… Why?

Intro Okay, this question was initially posted with hints that /etc/skel might be part of the issue. I have since removed the contents of /etc/skel, tried again and the issue still persists. As I ...
4
votes
2answers
5k views

Change user maildir to custom location upon creation of the user

I use Ubuntu 14.04.3 LTS . How to change the location of the Mailbox /home/user/Maildir/ to /Location/Mail/? I don't have to create home directory for that user. I did some changes in the /etc/...
3
votes
1answer
4k views

usermod to change user password is not working

I have created user using below command useradd myuser Then, I tried to do change password with following command usermod --password mypwd myuser (I know plain password is not a good way, but for ...
0
votes
1answer
118 views

Can We Input Return Using Shell Scripts? [duplicate]

I want to use adduser USER (USER is a user name), but this asks me many questions like full name and address. I want a script which types the return key automatically and skip those questions. For ...
0
votes
1answer
941 views

useradd Does Not Create a Group in SUSE

I maintain a package that is built for debian, RedHat, and SUSE Linux distributions. Part of the post install script follows: /usr/sbin/useradd -r -d /var/opt/CampbellSci/LoggerNet loggernet This ...
0
votes
1answer
650 views

What directory should I use for the user apache?

I have installed apache from the source with:prefix=/usr sysconfdir=/etc/httpd/ localstatedir=/var. useradd -g apache -d /usr/apache -s /sbin/nologin apache
1
vote
1answer
513 views

Unable to add or delete users

I'm currently having issues running adding, deleting and modifying Linux users. Reasonably new to Linux so pretty sure I have tried everything to resolve this. [root@device01 /]# useradd testuser ...
1
vote
0answers
887 views

How to test new user login?

I've done some searching on Google and SE and have not found what I need using my search terms. Accessing RHEL 5.10 (Tikanga) from Windows 7. I am making a new user and need to make sure their ...
1
vote
0answers
20 views

Unable to log in after creating a user [duplicate]

I have an install script that creates a user: sudo useradd -c "My test user" -G users -m -p "passw0rd$" -K PASS_MAX_DAYS=-1 -s /bin/bash myuser However when I try to log in via ssh I get the ...
4
votes
1answer
14k views

Can't add user because group already exists?

I initially added a user (adduser MYUSER) and then deleted it (deluser MYUSER). Now I'm trying to add it again (adduser MYUSER) and I get the following message: adduser: The group 'MYUSER' already ...
1
vote
3answers
517 views

Useradd w/o Home directory

I created a user without home directory using useradd -M Alice and set a password. Now when I login, I get this message No directory /home/Alice! Logging in with home= "/" -bash-4.1$ Can anyone ...
1
vote
2answers
10k views

Skeleton directory - how to add my own directories

I want to add a few directories to the skeleton directory. When I add new user I want to add my own directories to the new home directories.