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

learn more… | top users | synonyms

0
votes
0answers
16 views

Changing useradd configuration for primary group assignment doesn't work

I need to change the adduser default behavior to assign a certain group for new users. I've changed the USERGROUPS_ENAB variable to no in /etc/login.defs file: USERGROUPS_ENAB no And I've set the ...
1
vote
1answer
60 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
29 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 ...
7
votes
3answers
628 views

What is the difference between -g and -G options in useradd

Forgive me I am not strong in the Linux. As the title said . Could anyone please tell is there any difference between them? After I look through the help. I didn't found much difference between them....
1
vote
0answers
17 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 ...
0
votes
0answers
13 views

What will be the result when USERGROUPS_ENAB is set to no in /etc/login.defs and no groupname is specified when using the commnd useradd

The default command when we add a user is: sudo adduser -m -g initial_group -G additional_group -s login_shell user_name In /etc/login.defs USERGROUPS_ENAB is set to yes by default This means ...
1
vote
1answer
178 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 ...
2
votes
1answer
56 views

Create multiple username and UID in Linux using shell script

In my environment I constantly have to attach an NFS server running on Linux. The Linux client system has user names created in it and they are in a sequential order. But in order to set the sharing ...
1
vote
3answers
32 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 ...
0
votes
2answers
57 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.
19
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.IRWTMy0FHrPza6mh5wjomwbYtIIxnzxPZL7yg8SsvOdbjEpoI0G8uy7AqduYKQOn2R/rnnaalRmfPMy.a0 bwong20 [root@P-dude dude]# cat /etc/shadow | grep bwong20 bwong20:nf....
2
votes
1answer
26 views

Can I make it so that all new users created in the future will have an expired password by default? [duplicate]

I want to make it so that every time anyone creates a new user on my system that user will be forced to set a password during their first login. I can't find anything in /etc/login.defs that will do ...
0
votes
0answers
17 views

What does 'addgroup' do compared to 'groupadd' [duplicate]

I am new to Linux and have started using Ubuntu. One thing I am having issues with is adding users due to the lack of easy to find information on the subject. I have noticed that there are two ...
0
votes
0answers
17 views

Creating an user to access a specific director with just exec permission in Redhat

I am trying to create an user that I can access an specific folder and give this user just the execute access to a .sh script into REDHAT So I've created the user and set that user to the folder but ...
0
votes
0answers
17 views

useradd failing [duplicate]

Debian 8, I'm trying to allow a user to run Wireshark. user1@system:~$ sudo useradd -G wireshark user11 useradd: user 'user11' already exists However: user11@system:~$ groups user11 cdrom floppy ...
3
votes
1answer
435 views

Add user and set password using Ansible

I have created an Ansible playbook to create user and set password. But it is giving me an error ERROR: password is not a legal parameter of an Ansible Play Can someone help me with this? --- - ...
-1
votes
1answer
12 views

processes that run during new user creation

I have two questions: What processes typically run when a new user is created? What processes run when an existing (regular) user escalates his privileges to gain root-access? I Googled a lot and ...
1
vote
0answers
51 views

Change default group for any new user

I'm wondering if you could change defaults groups for new users without having to specify all of them manually. I'm trying to harden my ArchLinux and there's a group (provided by Grsecurity) that is ...
1
vote
1answer
55 views

How to add 100 users from a file [duplicate]

I have 100 names no passwords and i have to create accounts for them under directory /home/top100 how do I do this? Because using useradd 100 times does not sound fun, and even if i did, I have no ...
0
votes
0answers
120 views

SHELL definition in /etc/default/useradd has no effect

I'm running Ubuntu 14.04 via Vagrant. Within /etc/default/useradd, I've defined the SHELL setting to be /bin/bash. useradd -D reflects this setting, however it doesn't honor the setting when ...
5
votes
2answers
189 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 dont have to create home directory for that user. I did some changes in the /etc/default/...
1
vote
1answer
16 views

Is there any backward compatibility of -p (--path) option in user/group commands?

I upgraded from SUSE SLES 11 to SLES 12 and found that some user/group commands (such as useradd, groupadd, groupmod ... ) are no longer accept -p (--path) option to specific the directory of passwd, ...
3
votes
1answer
43 views

Creating new users via terminal does not assign correct permissions?

I am creating a new user for a Linux Debian distribution. I did use the command to create a new user via terminal, while I was logged in as root; tehn assigned the user to the sudo group, so I can ...
0
votes
1answer
165 views

Home directory for system users

What is the best practice when setting the home directory of system users that don't have a specific working directory. I often have to create users to run specific binaries or scripts. Supposing ...
1
vote
1answer
50 views

How to add users and add them to groups in linux bash

sudo adduser –G {teacher} user sudo adduser –G {teacher} user How could I fix this if user is an input variable and teacher is an existing group?
0
votes
0answers
120 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
0answers
40 views

User creation during authentication

I'm working with OpenBSD 5.6 and the goal is that I need to create user when he or she tries to authenticate with specific password. I've written a script for this purpose and everything goes ok but ...
0
votes
1answer
318 views

Using hashed password for adduser function in Linux

Sorry, I´m novice in Linux and I am looking for information, how to create new user account in Debian with pre-defined encrypted password. I have a function in bash, that if new user´s id´s are not ...
0
votes
1answer
137 views

How to delete an user account with terminal

I created a new account on my Linux OS, using the useradd command, now I want to delete the account created, I'm trying to use the userdel command to delete that account and I get the following error: ...
3
votes
1answer
144 views

Can't add users anymore by using useradd

Whenever I do # useradd -N --gid 1003 -s /bin/ksh --uid <some UID starting with 10027> --home /home/<someuser> <someuser> useradd just refuses to add any user and prints instead: ...
2
votes
1answer
95 views

delete user with non unique id

I created a user with non unique id passing -o -u 1000 -m option to useradd command. So now I have two users with same id but with different names and different home directories. I thought that this ...
0
votes
1answer
41 views

Lock down certain files

I want to be able to lock down files to be only executed and not editable unless root access is granted to the user. I have a file called 'server.properties' and I would like to make it so that only ...
6
votes
2answers
213 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, ...
0
votes
1answer
510 views

How to create a user without group? [closed]

Is this enough to create a user without group? Command: adduser -N auser
3
votes
1answer
243 views

Why useradd -m doesn't fill created home dir with some defaults?

My motives: I want to create deployment script which prepare all system with just 1 click, and although learn Linux this way. So I don't want to use interactive utils like adduser (all interaction ...
0
votes
2answers
43 views

How to bulk add disabled-password users?

Doing: # newusers username::1002:1002::/home/username:/bin/bash ^D No password supplied No password supplied No password supplied newusers: (user username) pam_chauthtok() failed, error: ...
0
votes
2answers
157 views

How to add “system” local user like mysql or tomcat?

My system has a lot of users, I'v never created, like mysql or tomcat. These users have no home directories inside /home Obviously, a daemon programs run under these users. What is the term for such ...
3
votes
1answer
103 views

added username, user unable to write to home directory

I added several users to my server using useradd -d /home/<username> <username> . The users are able to log in and access their directories, but get Permission denied error messages when ...
0
votes
1answer
139 views

RBAC user cannot execute useradd on Solaris 10

I am trying to create a user in Solaris 10 using RBAC who can execute the useradd and userdel commands. But for some reasons after i create the profile, role and user, this user gets a permission ...
0
votes
0answers
88 views

Added new user, but can't access account - public key encryption

I added a new user to one of our servers, but can't log in to it via putty. The error message is "Server refused our key", and from putty, "Disconnected: no supported authentication methods available (...
2
votes
2answers
333 views

Can I log in into a system user after I create him?

On an Ubuntu machine, if I run the following command: adduser --system --no-create-home system-user I create a system user named system-user without home directory with /bin/false as the shell. This ...
1
vote
3answers
46 views

If I delete groups, are users in those groups deleted?

I use ubuntu 14.04 and made 120 users. 115 users are in "student" and 5 users are in "assistant". If I delete groups, then are users in those groups deleted too?
1
vote
1answer
1k views

Linux/Unix username length limit

Would it be difficult to increase the limit or would it just be a one-place change? I have a system that could really elegantly make use of the Unix multiuser model for process isolation but I'd need ...
1
vote
3answers
30 views

Set up a user for a program

/etc/passwd shows many "virtual" users that are essentially for programs to use, rather than for people. How do I go about setting up such a user? All I need is a user that isn't used for anything ...
1
vote
2answers
840 views

Where & How is user group information stored in Ubuntu? [closed]

Two places possible: /etc/group and /etc/passwd. If I use command: adduser [username] [groupname], then the user would be added to the group, and the file /etc/group would then be updated. However, ...
5
votes
1answer
830 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 ...
1
vote
1answer
189 views

Is there a common naming convention for daemon user accounts?

I'm from a windows background where I'm used to creating separate domain service accounts for running various services. I like to keep things need so I would name them DOMAIN\service.whatever I'm ...
1
vote
2answers
2k views

Creating Group and User for Tomcat RHEL/CentOS

I newbie I want to create an user for my Tomcat installation, but I was viewing multiple options: # groupadd tomcat # # useradd -g tomcat -d /usr/local/tomcat tomcat # useradd -g tomcat -c "Tomcat ...
2
votes
2answers
172 views

Add a user wthout password but with SSH and public key

I want to add a user to Red Hat Linux that will not use a password for logging in, but instead use a public key for ssh. This would be on the command line.
0
votes
1answer
84 views

Enable user login, there by login can happen either as root or user based on requirement

I am working with a board and when it finishes the boot, it gives us login as root user. What I want to do is to login as user or root based my requirement. Mean when the board boots up i should get a ...