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

learn more… | top users | synonyms

13
votes
1answer
676 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 ...
2
votes
1answer
23 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
14 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
16 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
60 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
11 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
43 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
38 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
77 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 ...
4
votes
2answers
74 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 ...
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
38 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
84 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
44 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
72 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: # ...
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
151 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
90 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
97 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
51 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
23 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 ...
5
votes
2answers
148 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
287 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
146 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
35 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
106 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
75 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
97 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
62 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
250 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
45 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
758 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
29 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
515 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
553 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
135 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
1k 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
129 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
74 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 ...
0
votes
1answer
472 views

Restrict user to do SFTP on the www folder owned by www-data group

I would like to create a new user with read/write privileges ONLY in the /var/www/ directory including all sub-directories. The /var/www/ is owned by a group called www-data. Best way to do it I ...
0
votes
2answers
334 views

Create user from bash script

I'm in the process of making a bash script to automate adding a user. My password always have pattern, so I am setting that to a variable then... (this is where I am stuck -encrypting-). I found this ...
0
votes
1answer
163 views

create a linux user with create files and write permissions without sudo access

I want to create a user in such a way that it can create a file and update the contents of the file. useradd username Now for sudo, we can create username and linking to sudo like below: useradd ...
2
votes
2answers
154 views

How to choose system user ID for custom packages (RedHat & compatible)?

How should I choose the proper uid (or gid) for system users being created in a custom .rpm package? The user will be used to run a daemon non-root. I think it's not acceptabe to let adduser choose ...
0
votes
1answer
2k 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
1answer
94 views

How to create user account from script non-interactively without the password being seen?

The man page for useradd says http://linux.die.net/man/8/adduser -p, --password PASSWORD The encrypted password, as returned by crypt(3). The default is to disable the password. Note: This ...
1
vote
1answer
50 views

Linux Create user with specials login options

Hello i need create some users with special privilegies that will be: A user that can only login with ssh, no local, it can do anything in pc search, find, etc like a normal user but only with ssh. ...
2
votes
1answer
802 views

User created with different UID and GID

I'm creating a new user in my system, by calling: sudo useradd -m -G nas -s /bin/bash alf which supposedly should create a new user with the same UID and GID. However the passwd file is appended ...
1
vote
1answer
80 views

which command will give complete user creation in RHEL?

I want to create a user in RHEL 6.5 and i have three commands (1)useradd (2)adduser (3)system-config-users which one will give the complete user creation.
4
votes
3answers
5k views

Why is the home directory not created when I create a new user?

I created a new user (testuser) using the useradd command on an Ubuntu server Virtual machine. I would like to create a home directory for the user and also give them root provileges. However, when I ...