Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [useradd]

The tag has no usage guidance.

1
vote
1answer
26 views

How to create a user really without group in centos 7?

Per this question,I decide to create dummy user to be the owner of website files. Centos 7 offer default group ID 100 when I run useradd -u 508 -M -N -s /sbin/nologin dummyuser1. I want to provide ...
1
vote
1answer
54 views

Ansible adduser issue

Having some trouble with the user module in Ansible. Everything is technically working, just not as I expected. It seems Ansible uses "useradd" versus the newer "adduser" in Ubuntu and I think its ...
0
votes
1answer
50 views

Messed up homedir permissions from useradd command

For some reason adding new user with "useradd" create the homedir but with really messed permissions - 002. You read it correct only WRITE permissions for Others. Can someone point me what could have ...
0
votes
0answers
52 views

rpm + useradd = empty home directory

I am testing installation of my RPM on CentOS 7.4. In my specfile I have following entry: %post useradd myservice -r -m -d /var/lib/myservice -s /bin/bash 2>/dev/null || : After installation of ...
1
vote
0answers
166 views

How to use a custom skeleton directory with useradd?

I'm trying to create a new user account using a custom skeleton directory instead of the default /etc/skel. Reading man useradd I'm pretty sure this should work: useradd -m -d /home/foo -k /usr/...
1
vote
1answer
95 views

Default Group for new Users

Is there a possibility to define a default group for new Users? I mean I define the group testgroup as the default usergroup and when I add User1 and User2, both new Users would be in the group ...
1
vote
1answer
574 views

Ubuntu - adduser / useradd both ask for password to be set, can force a script to bypass this?

I have a script that works fine on Centos because useradd doesnt require a password to be set there and then, but the same script doesnt work on ubuntu servers as it requires this info. I ideally ...
0
votes
1answer
182 views

How to fix useradd: Invalid configuration: GID_MIN (7000), GID_MAX (900)

I am running a service as root. This service creates a user and a group but fails at creating a user with the above error how can this be fixed?
1
vote
1answer
2k views

Useradd with given password

I would like to add new user without needed any interaction, so with specified password. I have tried command above: useradd -m -p user -s /bin/bash user So it should be a user with password user, ...
0
votes
1answer
24k views

How to specify home directory when creating a user in linux? [closed]

I want to specify the home directory when creating a user, currently i'm using centos 6.7 Is it possible?
1
vote
0answers
39 views

Lock Home Folder down for specific users (CENT OS)

I am running multiple users on my VPS with CentOS 7 64 bit. And, I want to be able to lock down their home directory. I want them to be able to access all sub folders in that home directory but not be ...
1
vote
1answer
112 views

How can I allow users to reset their Linux user passwords from a web interface? [closed]

I am running SAS Visual Analytics on a cluster for my department. I want the users to be able to set and reset their own password for their user account. Users and Passwords for the application are ...
0
votes
1answer
277 views

add system user without login but able to su without asking for password

I created a user "sysuser" with -r option, when trying to su using another non-root user I am prompted for password. As "sysuser" is a system account and should not login, I did not set up a password....
18
votes
3answers
5k views

useradd not encrypting passwords in /etc/shadow

I stumbled accross this problem when trying to create new FTP users for vsftpd. Upon creating a new user with the following command and attempting login with FileZilla, I would get an "incorrect ...
0
votes
0answers
45 views

Failed backup, Create User Accounts from /home dir username uid gid

Trying to repair/replace a system from a failed backup. /etc is gone, trying to recover that, but in the meantime I need to work on a plan B. /home remains with UID and GID and all of the important ...
0
votes
2answers
357 views

Should I set the password when creating new user using useradd command?

I know that when creating a new user by useradd, I could set his password by -p option, but it seems insecure, then what the right way to create a user and set his password? I do this in two steps: ...
1
vote
1answer
1k views

Ubuntu 12.04: Unable to add or delete a user named 'mysql'

I am trying to install MySql on Ubuntu 12.04 but the installation is failing with the error: "Can't change to run as user 'mysql'. Check if the user 'mysql' exits." So I go ahead type in the command ...
0
votes
1answer
567 views

Cannot add user on Centos Server - Input/Output error

Today, on my Centos server I tried to add a user but got the following error: -bash: /usr/sbin/useradd: Input/output error How do i fix it? Thanks UPDATE: var/log/messages is blank df -h also ...
1
vote
2answers
17k views

Can't add local user on system using ldap auth for samba [closed]

Trying to add a local user to a CentOS 6.3 system that is using ldap for Samba authentication, but being stymied by the user's existing entry in ldap. [root@samba ~]# adduser wchandy adduser: user '...
3
votes
2answers
27k views

Best way to create a user with no password

What is the good way to create a user with no password? By no password, I mean an account, that would be usable only by the root account using the su/sudo commands (like the "nobody" user used by ...
0
votes
2answers
747 views

How to make Ubuntu useradd behave like Centos useradd?

I don't remember modifying CentOS useradd to get this behavior. useradd in CentOS creates the user's home directory with all the normal files (like .bashrc). I modified /etc/default/useradd to make ...
1
vote
2answers
5k views

server unexpectedly closed network connection Putty after useradd

After adding user [root@ctxsv-gl4j ~]# useradd -m mtteam [root@ctxsv-gl4j ~]# passwd mtteam Changing password for user mtteam. New password: Retype new password: passwd: all authentication tokens ...
4
votes
1answer
6k views

useradd with -d option do not create skeleton files

When I create a user with useradd command in centos 5, the home directory is created and its /etc/skel files are copied to that directory but when i give useradd with -doption to some different path ...
0
votes
2answers
399 views

Bash script for setting up FTP

Is it possible / any recommendations on writing a shell script to automate the process of creating a new user/ftp user: Currently the process: sudo useradd -d /ftp-files/user-a -m user-a sudo ...
0
votes
1answer
1k views

Add regular unix user to whm to use cPanel [closed]

I have been using useradd to create user account on my CentOS server although cPanel has been installed on the server. For some reasons, I created them by command instead of using WHM. Now, some of ...
10
votes
1answer
11k views

In what condition, should I create a system user instead of a normal user?

From the adduser command, I saw the option --system to create a system user. A system user will use /bin/false and by default belong to nogroup. It also won't copy the /etc/skel to the home directory....
6
votes
1answer
3k views

crontab file of a deleted user

After removing the user, does the crontab added by that user gets removed as well? I am asking this because I can see a user file called "abcuser" in the /var/spool/cron/ When I cat the file, I can ...
0
votes
2answers
92 views

creating user with limited access

I add a user on Application server using "useradd" command. /usr/sbin/useradd shantanu This user can connect to mysql service using the following command... mysql -h 10.10.10.111 -uroot -proot@123 ...
1
vote
2answers
85 views

formatting username [closed]

While adding a user what the best practice for username? firstname.lastname first character of firstname.lastname firstname lastname firstnamelastname I prefer "shantanu" from the following list. ...
1
vote
1answer
7k views

Pass password to adduser command

Just wondering if it's possible to pass the password I want to use to the adduser command in ubuntu, so that it can be automated. I want to do something like this echo "password" | adduser test ...
1
vote
2answers
1k views

automatically create subdomain, virtualhost and etc when add user

there is the way, how to automatically create the subdomain, virtualhost for apache, sharing configuration (samba), etc when I add a new user? I want it's work like the web hosting service, when we ...
0
votes
2answers
633 views

Debian add user permission

I'm giving my friend a host on my dedicated server. I created a new user for him: Debian server. adduser friend Adding user `friend' ... Adding new group `friend' (1000) ... Adding new user `...
-1
votes
2answers
580 views

Please help me understand useradd example's syntax [closed]

I've been doing some research on how to add a user to the system so as to have a new ftp user and one of the examples I ran across was this: useradd -m -G users,ftp,wheel joe -s /bin/bash passwd joe ...
1
vote
2answers
2k views

debian: creating user with password with one command

I need to create a user with password in a shell script, but passwd wants me to enter the password twice. Is there a way to create a user with password in one command?
1
vote
2answers
3k views

Can I automatically create a passworded user with pw adduser on freebsd?

Can I automatically create a passworded user with pw adduser on freebsd? pw useradd [name] [switches] -V etcdir alternate /etc location -C config configuration file ...
2
votes
2answers
2k views

adduser with a read / write to only one directory

I have CentOS with one ssh user which is root. How do I make one more user for my web developer so he can scp files over to /var/www/html ? Its gonna be a static page, so mysql and alike are out of ...
0
votes
1answer
110 views

Creating users/groups via PHP

I'm creating an internal tool that needs a bit of cpanel/webmin type functionality, but this isn't a situation where I could use one of those Right now I need to be able to create linux users, groups,...
0
votes
1answer
87 views

Is it possible to change the directory in which useradd creates its lockfiles?

Useradd creates lock files in /etc/ directory. Is it possible make it create them somewhere else?
1
vote
3answers
436 views

Samba users not added untill they logon first? Edit: How do I add users to tdbsam without a password prompt?

I add users to my server with the command useradd -m -p PASS_HASH -s /usr/sbin/nologin USERNAME Then I try to access their samba home share, but it never shows up until I login with the user: root:~$...
8
votes
5answers
11k views

Tab Autocomplete for New User

I added a new linux user by doing a useradd -d /var/www/mywebsite.com -m newuser passwd newuser I tested the account by logging into the server with the following command ssh newuser@mywebsite.com ...
7
votes
2answers
324 views

Setting up a user without a password

I'd like to be able to su to another user to run a script with reduced permissions. Unfortunately I have to type the password in every time, is there a way to create a user without needing the ...