All Questions

Tagged with
Filter by
Sorted by
Tagged with
1
vote
1answer
24 views

Primary and secondary group of a user

Why is it that group1 which should be user's primary group, is in the subgroups? The user is not even part of group1 in /etc/group file. # id user uid=1000(user) gid=1111(group1) groups=1111(group1),...
5
votes
3answers
982 views

Newly created user on Ubuntu Server has the wrong shell prompt

I've created a new user in the Ubuntu 18.04.01 like this: sudo useradd svn sudo passwd svn sudo mkhomedir_helper svn sudo usermod -d /home/svn -m svn Problem is, that if I switch to the user by su ...
0
votes
1answer
190 views

useradd with no options

When I create a user with useradd (no option) I can later add his passwd by using passwd new_user. How can I create his correct home directory (with Desktop and Templates inside) and all other ...
0
votes
0answers
106 views

How to configure which characters are allowed in CentOS usernames

In systems such as Debian, there is a file /etc/adduser.conf which includes directive NAME_REGEX that can be used to define which characters are allowed in a username. Is there a way to do this in ...
-4
votes
1answer
413 views

unix, adding users to existing directory in centos

I'm trying to add users to an existing directory but I keep getting: useradd: warning: the home directory already exists. Not copying any file from skel directory into it. I want to add users to ...
0
votes
2answers
626 views

Can I userdel a user without removing their home directory?

I did the following: useradd -d /home/iauser -m -s /bin/bash -c "IA User" iauser got this error: UX: useradd: ERROR: Create home directory failed. Operation not applicable It created an entry in ...
4
votes
1answer
808 views

ArchLinux | Login password does not work after creating new user account

I am trying Arch Linux for learning more stuff faster and not having GUI that bothers me, so that I can focus on learning stuff from Linux itself and the terminal. Since I was working with the default ...
1
vote
1answer
675 views

Password issue when adding user

I have run the command sudo useradd testuser Then when I run su testuser it ask for a password, and I have not set a password. So no matter what I type it gives me an authentication failure... ...
2
votes
2answers
1k views

How to create several root-like and non_root-like linux users [duplicate]

I have a red-hat system with its root and non-root users. I have to create n new root-like users and m new non-root users. Basically I have to clone the 2 kind of users already present on the server. ...
2
votes
1answer
39 views

How are new user IDs calculated automatically by default in Linux?

Basic Linux users are by default identified using some (positive?) numerical ID and at least some years ago there was no "magic" available to keep track of formerly used IDs in case of e.g. user ...
4
votes
1answer
2k views

How to automatically create an empty directory when new user is created?

I'm trying to make it so when I create a new user either by using useradd or adduser, an empty directory named "whatever" is automatically created under that user's home directory. I've tried ...
1
vote
0answers
28 views

Unable to add users [duplicate]

When I try to adduser or useradd it says command is "not found". Some sources suggest adding /usr/sbin to PATH, but it's already there. Some sources suggest first logging on as root, but su returns "...
-1
votes
1answer
173 views

User is not successfully created in RedHat

I'm trying to create a user in RedHat 6.7 but it's not working useradd testDoesn't give any errors, but /etc/passwd doesn't have the username Thus passwd testis failing
0
votes
2answers
1k views

Bash - How to shorten username in PS1

Currently my prompt is: xiaobai@dnxb:/tmp$ root@dnxb:/tmp# My desired prompt: xb@dnxb:/tmp$ rt@dnxb:/tmp# My idea is alias of username, so i tried reuse the same uid to create a new user: ...
1
vote
2answers
10k views

Trying to add user to group that exists in /etc/group not working

I'm trying to add a list of users to different groups on a debian VM. I am using the following sequence of commands in my bash script: getent group $uid || groupadd $uid #add ...
3
votes
1answer
4k views

usermod to change user password is not working

I have created user using below command useradd myuser Then, I tried to do change password with following command usermod --password mypwd myuser (I know plain password is not a good way, but for ...
4
votes
2answers
23k views

Add user and set password using Ansible

I have created an Ansible playbook to create user and set password. But it is giving me an error ERROR: password is not a legal parameter of an Ansible Play --- - hosts: all user: root vars: ...
1
vote
0answers
352 views

Change default group for any new user

I'm wondering if you could change defaults groups for new users without having to specify all of them manually. I'm trying to harden my ArchLinux and there's a group (provided by Grsecurity) that is ...
2
votes
1answer
4k views

Home directory for system users

What is the best practice when setting the home directory of system users that don't have a specific working directory. I often have to create users to run specific binaries or scripts. Supposing ...
1
vote
1answer
381 views

How to add users and add them to groups in linux bash

sudo adduser –G {teacher} user sudo adduser –G {teacher} user How could I fix this if user is an input variable and teacher is an existing group?
3
votes
2answers
2k views

Why useradd -m doesn't fill created home dir with some defaults?

My motives: I want to create deployment script which prepare all system with just 1 click, and although learn Linux this way. So I don't want to use interactive utils like adduser (all interaction ...
0
votes
2answers
2k views

How to add “system” local user like mysql or tomcat?

My system has a lot of users, I'v never created, like mysql or tomcat. These users have no home directories inside /home Obviously, a daemon programs run under these users. What is the term for such ...
3
votes
2answers
2k 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 ...
2
votes
1answer
4k 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
60 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 ...
0
votes
2answers
3k 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
1answer
901 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 ...
1
vote
1answer
109 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. ...
2
votes
1answer
2k 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
101 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.
13
votes
3answers
51k 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 ...
1
vote
1answer
38 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 ...
9
votes
1answer
19k 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
812 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
735 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
678 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
1answer
887 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?
70
votes
3answers
65k 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 ...
2
votes
2answers
288 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
480 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 ...
6
votes
2answers
22k 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 ...
7
votes
2answers
2k 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?
3
votes
1answer
697 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 ...
1
vote
2answers
10k views

Add a new user steps for Oracle Linux 5

It's been over 10 years since I last used RedHat (which I believe that Oracle Linux came from). So I cannot remember the steps to create a new user, add them to the appropriate groups, set up their ...
3
votes
1answer
26k 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 ...
1
vote
2answers
675 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 ...
5
votes
3answers
43k 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 ...
0
votes
1answer
328 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 other ...
19
votes
2answers
13k 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
11k 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 ...