Tagged Questions

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

learn more… | top users | synonyms

1
vote
1answer
9 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
42 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
81 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
25 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
211 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
56 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
61 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 ...
1
vote
1answer
127 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
56 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
21 views

Difference between useradd and adduser [duplicate]

What's the difference between the two commands: sudo useradd and sudo adduser?
0
votes
1answer
182 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
129 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?
20
votes
1answer
4k 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
88 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
85 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
103 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
77 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
401 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
277 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
277 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
2k 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
7k 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
143 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
152 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
276 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
4k 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
6k 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
387 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
306 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
125 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
1k 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
1k 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
3k 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
1k 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
1k 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 ...
5
votes
4answers
4k 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
440 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
163 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
7k 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 ...
5
votes
3answers
13k 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
220 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
230 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
914 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 ?
2
votes
4answers
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
9k 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
6k 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
368 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
2k 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?
6
votes
2answers
1k 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
5k 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 ...