Questions tagged [usermod]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
83 views

It says always I'm not in "sudoers" file!

I migrated from Ubuntu-20 to Debian-12, and I can't excute the command sudo with my username my_name within a fresh installed system. So, I added my_name into "sudo" group(usermod -aG sudo ...
Leon's user avatar
  • 141
0 votes
0 answers
301 views

Change user ID of user in Linux, but don't touch the files in the home directory

I want to change the user ID of www-data, but not touch the files in the home directory. usermod man page: -u, --uid UID The new numerical value of the user's ID. This value must be ...
Alex's user avatar
  • 436
2 votes
2 answers
309 views

How to change user home directory when in use by /usr/lib/systemd/systemd --user

After copying all contents of a user home directory I'm trying to change the home directory to the new location. But systemd prevents me from doing this. # sudo usermod -d /data/home/user/ user ...
carl verbiest's user avatar
-1 votes
1 answer
203 views

Kali Linux freezes after I log in, but not if I log into root first and then switch user

I recently changed the default kali username and password via following a tutorial that used usermod commands. However, after logging back into the newly named account, the screen freezes on the ...
Hugh Wise's user avatar
0 votes
0 answers
36 views

Ramifications of renaming a user [duplicate]

I'm setting up two computers with MX Linux that will be nearly identical, with a lot of customization from the original distro. I installed and customized the first one for User1, and will basically ...
fixer1234's user avatar
  • 673
10 votes
6 answers
4k 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 (...
ZioByte's user avatar
  • 850
0 votes
0 answers
497 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 ...
alle_meije's user avatar
1 vote
2 answers
5k 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 ...
powerhousemethod's user avatar
6 votes
1 answer
6k 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 ...
WobblyWindows's user avatar
-4 votes
3 answers
9k 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 ...
Cipher Visor's user avatar
0 votes
3 answers
516 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 ...
user2425931's user avatar
0 votes
1 answer
3k 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
Rebecca's user avatar
  • 103
0 votes
2 answers
9k 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 ...
Alexander Rakhmaev's user avatar
0 votes
0 answers
46 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 ...
Mukunda Paudel's user avatar
4 votes
2 answers
9k 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 ...
Sara1209's user avatar
2 votes
2 answers
1k 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--. ...
achille's user avatar
  • 103
0 votes
1 answer
565 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 ...
Akkilah's user avatar
  • 43
0 votes
1 answer
84 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 ...
2586steps's user avatar
-2 votes
1 answer
414 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.
Manny_Fresca's user avatar
1 vote
0 answers
38 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 ...
krypton's user avatar
  • 131
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 : ...
tani joshi's user avatar
2 votes
1 answer
955 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 ...
Pratched's user avatar
  • 151
1 vote
1 answer
907 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 ...
millerthegorilla's user avatar
2 votes
2 answers
6k 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
102 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 ...
user208145's user avatar
  • 2,447
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 -...
tani joshi's user avatar
2 votes
0 answers
2k 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 ...
Amol Deodhar's 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 ...
blabla_trace's user avatar
1 vote
0 answers
191 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 ...
Micheal J. Roberts's user avatar
1 vote
0 answers
202 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 ...
Yet Another User's user avatar
1 vote
3 answers
632 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 ...
jango's user avatar
  • 413
2 votes
1 answer
239 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 ...
BSD's user avatar
  • 123
4 votes
1 answer
2k 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'...
Petr Skocik's user avatar
  • 28.3k