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

learn more… | top users | synonyms

1
vote
2answers
115 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
2answers
37 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
37 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
25 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
47 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, ...
0
votes
0answers
61 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 ...
0
votes
1answer
41 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
158 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
63 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
39 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
74 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
85 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
54 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
46 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
528 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
33 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
43 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. ...
1
vote
1answer
273 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
42 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.
2
votes
3answers
475 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 ...
0
votes
1answer
120 views

useradd PAM authentication failed

I needed to customize useradd command so i downloaded shadow-utils source package. Using configure-make i was able to compile the source , binary was generated (configure prefix) at custom location ...
2
votes
2answers
359 views

Adding “ubuntu” user to Vagrant ubuntu instance

I am using a vagrant box : uname -a Linux precise64 3.2.0-23-generic #36-Ubuntu SMP Tue Apr 10 20:39:51 UTC 2012 x86_64 x86_64 It does not have ubuntu user setup , instead it has vagrant one ,so I ...
1
vote
1answer
1k views

Adding multiple user with shell script on Ubuntu [closed]

Can someone help me in providing me the shell script for creating multiple users on Ubuntu. Password needs to be different for each user. Thanks in advance
1
vote
1answer
27 views

Grant rights to create / manage users

Is there a way I can grant a user or a group the permission to add/edit other users without the ability to alter anything else on the system? The idea is to give helpdesk agents the ability to grant ...
1
vote
1answer
136 views

I am try to interactively add a user via “useradd”

I am basically trying to write a simple script to allow for interactive use of "useradd" with select options. The options I am trying to allow for specific use are to either be defined interactively ...
1
vote
1answer
182 views

Why does the debian installer force me to use a username starting with a-z while adduser doesn't enfore this?

I have just installed Ubuntu Server, through the standard cli menu driven interface and it prompted me to create a new account. Attempting to create my numerical user (e.g. 12345), I got an "Invalid ...
0
votes
2answers
70 views

Problems in prompt with new users in debian 7 wheezy

I have debian 7 x64 wheezy machine on digital ocean. Every time I add a new user the user prompt is empty. I only have a dollar ($) and nothing like shikhar@server: on my prompt. I cannot access ...
1
vote
1answer
2k views

What steps to add a user to a system without using useradd/adduser?

I was browsing through some Linux questions and saw this interesting question. What steps to add a user to a system without using useradd/adduser? The one possible way that comes to my mind is, ...
2
votes
2answers
122 views

How to prevent a new user to inherit the files of a deleted user?

I just deleted a user with "userdel", without deleting its home dir. Right after the deletion, I created a new user, with its own home dir. What striked me as odd, was that the new user gets the UID ...
2
votes
1answer
160 views

Unix Useradd - Audit list of users added to system [duplicate]

I would like to understand how could I pull out a list of users that have been added with certain privileges to a Unix system over a certain period of time. Now, I understand one way to go about ...
2
votes
2answers
293 views

AT&T UNIX System V Release 4 - How do I create a new “Administrator” user?

I am running AT&T UNIX System V Release 4 Version 2.1 inside VirtualBox, and want to create a new "user account" for myself. At first, I simply created a new user with the useradd command, but ...
1
vote
1answer
133 views

backup user accounts without giving a home directory to them

I am reinstalling the older Ubuntu machines with the latest RHEL 6.0 in servers. I have /etc/passwd and /etc/group and /etc/shadow file backed up for the list of user accounts that I need to create ...
0
votes
0answers
23 views

Difference between useradd and adduser [duplicate]

What's the difference between the two commands: sudo useradd and sudo adduser?
0
votes
2answers
872 views

Why does PAM prevent root from using useradd?

I'm using Arch Linux on a single-user workstation with LXDE and lxde-session autologin to the regular user. I then "su" or "sudo" to root privileges, and try to run "useradd." useradd fails on my ...
0
votes
1answer
427 views

Creating operating system (OS) user in Oracle LINUX

I am a user with sudo access. To install MySQL, I have to create an operating system (OS) user called MySQL. Can I create a user which also has sudo access on this machine?
29
votes
1answer
17k 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 ...
1
vote
1answer
290 views

Create a Custom User in FreeBSD

I want to create a user in the FreeBSD for nginx that has: No Login. No home directory how should I do that with pw useradd or any other tool.
1
vote
2answers
227 views

can I tell to useradd to execute a script? Maybe in /etc/default/useradd?

There are plenty of people that already answered to the question "how to execute useradd properly in a script?" My question is: "is it possible to tell to useradd to execute one script when it is ...
1
vote
2answers
129 views

Creating a user valid for a given time period? [duplicate]

I wan to create a user on Ubuntu valid for 10 min. How can I do that if it's possible?
0
votes
2answers
719 views

why useradd havent created the standard files?

See I have created some user in my CentOS with useradd command. And I didn't get any kind of automatic standard dir creation and its not been versatile actually while I am creating that user. see the ...
0
votes
2answers
345 views

How to change user name

I somehow changed my prompt (PS1) from [mpatil@localhost ~]$ to bash-4.1$. I also have changed my user mpatil's home directory from /home/mpatil to /home/algo. Now some applications are not working ...
1
vote
1answer
740 views

useradd does not work but has exit code 0

One of my Solaris 10 servers will not add new users. Existing users are able to log in. The useradd command appears to work normally but it does not add the user. I checked my other Solaris servers ...
5
votes
2answers
5k views

what does `adduser --disabled-login` do?

An install document I'm following instructs to add a user like so: sudo adduser --disabled-login --gecos 'GitLab' git The --disabled-login flag is absent from most man pages I have searched. ...
4
votes
1answer
15k views

How to set password for users in AIX using single line command?

Is there any way in which I can set the password for a newly created user account in AIX in a one line command? I don't want to give any prompt to the user. If there is a command, it should set the ...
3
votes
2answers
212 views

Securely allowing users to create accounts

1) I'm struggling to find a secure way to allow new users to create accounts without granting them admin rights to do so. If you already have an account on my system and can work UNIX command line, ...
1
vote
1answer
233 views

useradd --no-log-init [comprehension question]

TLDR: How is useradd --no-log-init actually used [in GNU/Linux [Debian]? I read the command's man and info page about this option as: »user will not be listed in the lastlog and faillog files ...
3
votes
1answer
543 views

difference between useradd -b and useradd -d

Can somebody please explain to me the exact differences between useradd -b and useradd -d in [Debian] Linux? Both seem to work quite similar to me, but then I spot differences that confuse me.
5
votes
2answers
10k views

Proper way to add a user account via bash script

I cross posted this question to AskUbuntu because my problem seems most acute on Debian/Ubuntu, but it was suggested that I ask here. Whatever method is suggested for solving this problem should work ...
3
votes
2answers
14k views

How to add a unix/linux user in a bash script

Here's my test bash script. I'm not able to get it to work. I'm seeing two errors: Use of uninitialized value $answer in chop at /usr/sbin/adduser line 589. Use of uninitialized value $answer in ...
5
votes
2answers
1k views

is there any reason to avoid editing /etc/group directly

I find it much easier to edit files directly rather than remember commands like useradd -g, usermod, groupmod, etc. Is there anything wrong with just editing /etc/group directly?