Questions tagged [useradd]
The useradd tag has no usage guidance.
44
questions
22
votes
5
answers
22k
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 [email protected]
...
21
votes
3
answers
9k
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 ...
20
votes
2
answers
18k
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....
8
votes
1
answer
4k
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 ...
7
votes
2
answers
354
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 ...
6
votes
2
answers
44k
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 ...
4
votes
1
answer
10k
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 ...
3
votes
1
answer
54k
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?
3
votes
1
answer
8k
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, ...
2
votes
1
answer
1k
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 ...
2
votes
2
answers
23k
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 '...
2
votes
2
answers
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 ...
2
votes
1
answer
2k
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 ...
1
vote
1
answer
9k
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
1
answer
698
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
2
answers
4k
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
...
1
vote
1
answer
308
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
1
answer
2k
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 ...
1
vote
2
answers
2k
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 ...
1
vote
2
answers
3k
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
2
answers
8k
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 ...
1
vote
2
answers
112
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
0
answers
723
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
0
answers
57
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
1
answer
242
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 ...
1
vote
3
answers
762
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:~$...
0
votes
1
answer
581
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?
0
votes
2
answers
620
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
2
answers
100
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
...
0
votes
2
answers
915
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 ...
0
votes
1
answer
130
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
2
answers
583
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:
...
0
votes
1
answer
739
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 ...
0
votes
2
answers
682
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 `...
0
votes
1
answer
88
views
Script to notify me when users are created
I've created a script from what ive found on the web to notify a SA of users being added to a server. I have it setup with a cron to run the script every 5 mins to monitor differences in the /var/log/...
0
votes
1
answer
48
views
Add an aliases user root2, results changing the owner root to root2
Am looking to add an alias for the root user to log to the server with a different password
So I followed this advice
https://serverfault.com/a/870301/429729
by using the following command
useradd -o -...
0
votes
1
answer
532
views
Create user without adding subuid range
Is it possible to create a new user e.g. with useradd without adding an entry to /etc/subuid even if the latter file exists?
I use /etc/subuid only to for the user namespacing by Docker but don't want ...
0
votes
1
answer
797
views
su Authentication failure
OS Ubuntu 18.04
I am trying to add a user, with password, home directory, create a group with the same name, using a bash script.
I tried:
sudo useradd -U -m -p $(openssl passwd -1 'some_password') ...
0
votes
1
answer
865
views
useradd from jenkins user error: useradd: cannot lock /etc/passwd; try again later
I run a shell script (Centos 6.7) from jenkins containing this command, in order import root environment:
env -i `cat /home/admin/root_environment.sh` /home/admin/create_user.sh
The ...
0
votes
1
answer
139
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
1
answer
428
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....
0
votes
1
answer
2k
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 ...
0
votes
1
answer
100
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
votes
2
answers
662
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
...