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

learn more… | top users | synonyms

0
votes
1answer
22 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?
17
votes
1answer
894 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
34 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.
0
votes
0answers
40 views

usermod -L after creating the home dir

so I see from some questions here, to lock an account, create it, then lock, e.g. useradd -M lol;usermod -L lol However.. I do have a home dir, by eg. useradd -md /path/lol Question is.. to avoid ...
1
vote
2answers
37 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
43 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
97 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
67 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 ...
0
votes
1answer
130 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 ...
4
votes
2answers
826 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. ...
3
votes
1answer
2k 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 ...
2
votes
2answers
110 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
95 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 ...
2
votes
1answer
180 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.
4
votes
2answers
1k 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 ...
2
votes
2answers
3k 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 ...
4
votes
2answers
130 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?
2
votes
1answer
282 views

Should I use useradd or adduser?

I am trying to add a new user to the system. I am confused though which command to run: useradd or adduser?
2
votes
1answer
103 views

Adding a user to a group by default

I have a group that all users on the system share. The group name is common and it is to allow for a universal fileshare for everyone on the machine. How would I make it so that all new users are ...
0
votes
2answers
812 views

Add new user with permissions same as existing user

How to create a new user with permission exactly same as an existing user in linux.
0
votes
1answer
504 views

adding home directory after -M option

First off I'm new to Linux. I have created a new user called "ginny" with -M option. Now I'm trying to assign a home directory with usermod -d /link/to/directory ginny but it doesn't assign a home ...
1
vote
1answer
2k views

Why useradd shows Permission denied error

I am working on CentOS 5.5. When I run the useradd command as root, then its working. But when I run the same command from one of the user, then it shows -bash: /usr/sbin/useradd: Permission ...
0
votes
1answer
809 views

Solaris 10, useradd command

When I used useradd command to add a new user for my Solaris 10 System, I specify /home/user-name to be its home directory. but the command didn't run successfully, and when I put the ...
1
vote
1answer
935 views

useradd fails on archlinux

testing out archlinux in a vm by following a tutorial on youtube.. all is fine up until the point where i reboot, boot with the hard disk and enter root at the login screen. i am trying to add a new ...
3
votes
4answers
2k views

How can I assign an initial/default password to a user in Linux?

I found a guide that explains how to set a user's password. I'm trying to automate it and send an e-mail to the user like: userid created with password XYZ. request to change the initial password. ...
1
vote
2answers
366 views

Can't SSH/FTP into new user account in Ubuntu?

Created new user from shell script using following command: sudo useradd $1 -p $2 --home /var/www/$1 I'm not able to login to FTP or SSH as that user, do i need to add the user to some group for ...
2
votes
3answers
160 views

User with read access to /home

Pardon my ignorance but I can't seem to come up with a solution to this one. I'd like to create a user that has read access to every user's home catalog located in /home. Do I need acl's for this or ...
4
votes
1answer
4k views

How to create a user with given password on SuSE from command line?

I need to create bunch of new users with given password. What I want is a script that I would pass the user name of new user and it will create/add the user and set its password. (the password is the ...
3
votes
2answers
7k views

How do I set the password of a new user after the account has already been created?

I used the 'useradd' command to create a new account, but I did so without specifying the password. Now, when the user tries to log in, it asks him for a password. If I didn't set it up initially, ...
3
votes
3answers
196 views

When adding a user to a new group when does the user group permissions become active when its a /nologin user?

I have a service level account to run my webserver, and this user is setup with /sbin/nologin. Normally when you add a user to a group you must logout and login to use the new group permissions. ...
0
votes
1answer
212 views

Incompatible group permissions in Linux - Is it a bug? [duplicate]

Possible Duplicate: How to apply changes of newly added user groups without needing to reboot? I am on Ubuntu 11.04. I am creating another user and placing an existing user in the group of ...
2
votes
1answer
602 views

How to add folder to existing user [proftpd]

As we know we can add folder to user using useradd user -p user_passwd -d /home/ftp/user_dir/ -s /bin/false but how to add folder to existing user, for example /home/ftp/root for root ?
1
vote
3answers
2k views

Why is the default umask value for useradd in openSuSE set to 022?

I recently built a very simple test environment with oepnSuSE. As I tried to configure a shared directory, wihtout using ACLs, but with SetGID on that directory instead for some reason, I noticed ...
1
vote
2answers
6k views

No home directory, logging in with HOME=/

Created a new user in Ubuntu 11.04 using useradd -d /home/dummy -m dummy Now, after this I set its password using passwd dummy But, when i login to that user using su - dummy I get to see No home ...
5
votes
2answers
4k 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
2answers
239 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, ...
2
votes
5answers
1k views

Create new linux account as a user without root access

Is it possible to create a non-root Linux user account without being logged in as a root user and without using sudo?
3
votes
2answers
668 views

Bash is not fully functional for a new user

I just created a new user on my system using useradd -d /home/users/john -m john (Using Ubuntu 11.04). This worked fine, but when I changed to john, my bash is not fully functional. That is, it has no ...
7
votes
2answers
4k views

Why is sudo telling me my password is wrong?

I recently installed OpenBSD 4.9 in my computer, so I could learn a little bit about Unix-like operating systems. I added a new user to the system called bruno. Ok. When I use the 'sudo' command, it ...
3
votes
1answer
227 views

Accidentally included special characters in username when adding user

I was trying to add a user called joebloggs and accidentally hit other keys as I pressed enter: useradd -u 12345 joebloggs$* (on French keyboards the $ and * keys are next to Enter) doing a cat of ...
5
votes
3answers
794 views

How should I add users non-interactively?

I have a set of users I need to add to a new system as part of a BASH script that preps my server. How can I non-interactively add the user, create their home directory, set the group, and enter a ...
4
votes
1answer
872 views

Not able to set password in ArchLinux

I logged in as root and created a new account: # useradd -d /home/onie -m onie # su onie Now I try to set the password for onie myself using the passwd command, but it's asking for my current ...
6
votes
2answers
3k views

What are the allowed group names for groupadd?

I followed these instructions to build Shadow, which provides the groupadd command. I am now getting an error when trying this: $ groupadd automake1.10 groupadd: 'automake1.10' is not a valid group ...
2
votes
2answers
2k views

Add new user in solaris

I tried to add a new user in solaris 10, but got an error: $ useradd -g oinstall -G dba -d /export/home/oracle oracle UX: useradd: ERROR: Inconsistent password files. See pwconv(1M). I ran pwconv, ...