Questions tagged [usermod]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
9 votes
6 answers
2k views

Completely lock user account on server, including ssh

I need to lock some user accounts, without messing with their HOME, if at all possible. Normal way would be usermod -L user but it seems to leave open ssh login with public key authentication (...
user avatar
  • 738
0 votes
0 answers
107 views

undo usermod for root?

At some point where I wanted to do sudo usermod -v 1000-1000 USER sudo usermod -w 1000-1000 USER I accidentally applied both these commands to root. According to the documentation I can undo these ...
user avatar
0 votes
0 answers
66 views

How install sudo from user without root password

On Debian 10 I do: adduser myuser usermod -aG sudo myuser usermod -p '*' root reboot And then I saw that Debian comes without sudo by default :) Is possible to install sudo or set root password again ...
user avatar
1 vote
2 answers
2k views

username is currently used by process

I am trying to change the home directory of a user. using usermod ravishshankar --home /var/www/domainname/public_html/ but get usermod: user username is currently used by process 1378 I try to kill ...
user avatar
2 votes
1 answer
2k views

difference between 'usermod -aG' and 'usermod -G' options

I'm preparing for the LPIC-1, exam 102, and was wondering what is the difference between these two commands with respect to options -G and -aG: usermod -G projectA, projectB jsmith usermod -aG ...
user avatar
-5 votes
3 answers
5k views

Trying to change kali username, user is currently used by process

On a VMware Workstation Player VM, I have been trying to change my default user account name "kali". The command I tried was usermod -l newname kali. But it gives me the error usermod: user ...
user avatar
0 votes
3 answers
288 views

User and Group Management

While working on Linux Essentials, I was experimenting with removing a user (me) from a group I created. Following online instructions, I ended up deleting myself from all the default groups and my ...
user avatar
0 votes
1 answer
2k views

Give a user admin right to run yum on centos 8

I give a user admin access with: usermod -a -G wheel userX but when I log in with userX, I am not able to run yum. What do I need to do? Thanks
user avatar
  • 103
0 votes
2 answers
3k views

Why doesn't "usermod" work under superuser?

The usermod command successfully through sudo. sudo usermod -aG some_group some_user However, if you execute it through su, then there will be an error. su ...I enter root password... usermod -aG ...
user avatar
0 votes
0 answers
41 views

Not being able to edit user's info in linux

I have managed to write this code. It runs, but no change was made to the user's info. It seems like usermod isn't working. What I am wanting to do is, to be able to edit existing user's info in the ...
user avatar
4 votes
2 answers
6k views

Difference between expired account and inactive account

After a command like: $ usermod -e <yesterday> -f <tomorrow> bea Bea's account will be expired, but still active (until tomorrow). What's the difference? What could happen yesterday ...
user avatar
2 votes
2 answers
861 views

chgrp chown usermod are useless if not root?

I am logged under 'achille' achille belongs to 2 groups: groups achille achille: achille users I want to change the group owner of file 'tree.test' to group 'users' ls -l tree.test -rw-r--r--. ...
user avatar
  • 69
0 votes
1 answer
233 views

useradd account cant login through GUI

I'm using KALI fresh install. Linux kali 5.2.0-kali2-686-pae #1 SMP Debian 5.2.9-2kali1 (2019-08-22) i686 GNU/Linux I created a user using useradd akkilah Then i added this user to sudo group ...
user avatar
  • 23
0 votes
1 answer
63 views

single user, once with once without sudo

I have added a new user on my ubuntu machine with the following command: sudo adduser test and then granted him sudo with: sudo usermod -aG sudo test So far everything seems pretty standard. The ...
user avatar
-2 votes
1 answer
249 views

Sudoers permissions to new user that only allow "useradd and usermod"

I want to create a new user and I want this user to be allowed to only run "useradd" and "usermod" Will I need to configure the sudoers file? Not sure how to go about this.
user avatar
1 vote
0 answers
21 views

unable to boot directly to desktop environment

I tried to change a user's login name with usermod --login krypton maddybut now everytime I reboot my pc, it doesn't directly shows the desktop environment and I need to do Ctrl+Alt+F2 and then startx ...
user avatar
  • 31
2 votes
1 answer
3k views

command to add multiple “secondary groups” for a user in Solaris

I am trying to add 2 secondary groups for a user is Solaris system, but not able to do so. It only adds 1 secondary groups. I've done enough R&D, not sure what to do. Below command I am using : ...
user avatar
2 votes
1 answer
624 views

Cannot su into root default shell - Debian

I am using a Debian 9 server. Usually I access via ssh to a normal user (say user1) and su into root, because I disabled ssh into root. Lately I was setting up a git-server where I created a user git ...
user avatar
  • 141
0 votes
0 answers
591 views

unable to add user to group fedora 29

I used groupadd to add a group so that I could manage with git some root owned scripts. I then used usermod to add a user to a group. The user is the currently logged in standard user and I am in a ...
user avatar
2 votes
1 answer
3k views

Unable to add user to a group due to sssd?

I'm working on Fedora 29 x86_64 fully patched. I'm trying to add my user to the dialout group so I can open the modem: $ ls -Al /dev/ttyUSB0 crw-rw----. 1 root dialout 188, 0 Feb 22 19:27 /dev/...
user avatar
2 votes
1 answer
77 views

Solaris 5.10 shell replacement for Centos 7 migration

I have an old Solaris 5.10 server. I'm migrating the tomcat products to Centos 7. There are two accounts on the Solaris server that I need to migrate. The shells for both of those accounts are ...
user avatar
  • 2,299
0 votes
1 answer
1k views

usermod command not working on solaris

I am trying to add one more group in already added supplementary groups for a user. rcc is the name of the supplementary group I need to add sm254040 is the user id. when I run the command usermod -...
user avatar
1 vote
0 answers
1k views

whoami returns user, but usermod complains it doesn't exist

I have Linux (Ubuntu) on a VM provided by corporate IT in my organization, and I have a user "myuser". whoami is able to return the username: myuser@host:/home/myuser$ whoami myuser id returns info ...
user avatar
0 votes
1 answer
1k views

non-root user set group ownership

The official Red Hat System Administration I RH124 says: root can grant ownership to any group, while non-root users can grant ownership only to groups they belong to [student@web ~]$ id ...
user avatar
1 vote
0 answers
143 views

Automated logout of present session to refresh group commands?

So, I'm looking at automating a setup of service instances with AWS. AWS allows you to run shell scripts on instance creation. However! I've run into one little snag. I want, on initial ssh into the ...
user avatar
1 vote
0 answers
148 views

Why does usermod default to overwriting secondary groups?

As anyone who has used usermod to add a user to a group knows, invariably a mistake will be made (probably once in a career and not again) in which -a is forgotten and the secondary groups are ...
user avatar
1 vote
3 answers
268 views

linux + how to verify user is in group? [duplicate]

how to verify that new user was added to group? example by this syntax I will add the user dog to group - white_house_group usermod -a -G white_house_group dog after that , how to verify that ...
user avatar
  • 353
2 votes
1 answer
137 views

ID results different depending on who asks

I have userX who has realtime privileges thorugh the realtime group. I wanted to give that user admin privileges so I switched to root ~>su root and ran #>usermod -a -G root userX After a ...
user avatar
  • 123
3 votes
1 answer
1k views

Reserving a range of anonymous UIDs; /etc/subuid

I need a range of uids (say a few thousand) for a setuid-root tool to use. Is there a protocol to registering such a range or do I just pick a range and hope no other program will use those uids? (I'...
user avatar
  • 26.3k