Questions tagged [usermod]
32 questions
10
votes
6 answers
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 (routinely used on this server).
I know I could just mv…
ZioByte
- 830
- 1
- 10
- 22
6
votes
1 answer
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 projectA, projectB jsmith
The user jsmith has its own…
WobblyWindows
- 727
- 1
- 9
- 24
4
votes
2 answers
Difference between expired account and inactive account
After a command like:
$ usermod -e -f bea
Bea's account will be expired, but still active (until tomorrow).
What's the difference? What could happen yesterday and can't happen today? And what can happen today but not after…
Sara1209
- 51
- 1
- 4
3
votes
1 answer
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'd rather not create not clutter /etc/passwd with…
Petr Skocik
- 28,176
- 14
- 81
- 141
2
votes
2 answers
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
usermod: user user is currently used by process 10050
#…
carl verbiest
- 471
- 4
- 11
2
votes
2 answers
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--. 1 achille achille 2512881 Dec 1 11:53 tree.test
I…
achille
- 103
- 9
2
votes
1 answer
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 :
sudo usermod -g Primarygrp -G…
tani joshi
- 29
- 1
- 5
2
votes
1 answer
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 with the group git and restricted him to…
Pratched
- 151
- 5
2
votes
2 answers
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/ttyUSB0
$ sudo usermod -a -G dialout jwalton
(Fri Feb…
user56041
2
votes
1 answer
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 identified as "/usr/local/bin/ftponly". This looks like…
user208145
- 2,437
- 2
- 20
- 21
2
votes
0 answers
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 related to the user too:
myuser@host:~$…
Amol Deodhar
- 21
- 2
2
votes
1 answer
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 brief delay I got back to the prompt and tested the…
BSD
- 123
- 4
1
vote
2 answers
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 pid 1378 but get bash: kill: pid: arguments must…
powerhousemethod
- 435
- 9
- 25
1
vote
0 answers
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 and when I run who I get previous username at…
krypton
- 131
- 6
1
vote
1 answer
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 shell through su into the superuser account in…
millerthegorilla
- 211
- 1
- 2
- 5