1

In SUSE the command groupmod -A "username" wheel will add any user, even if they don't exist, to the wheel group.

In Redhat the -A argument does not exist. and other tools such as groupmems will not add the user if they don't already exist.

How can I add a non-existant user to the wheel group with Redhat CLI native tools?

  • im using quest tools and this is a domain user so the user is not locally configured.
  • i know that there are other ways for getting the permissions configured but i want to do this by adding it to the wheel.
4
  • 2
    Why don't you just create the user first?
    – DavidPostill
    Sep 8, 2015 at 13:12
  • im using quest tools and this is a domain user so the user is not locally configured.
    – Asaf Magen
    Sep 8, 2015 at 13:13
  • Please edit your question and add that relevant information.
    – DavidPostill
    Sep 8, 2015 at 13:14
  • "Domain user" shouldn't matter any... If the user can be resolved at all (whether by LDAP, NIS, or AD) it can be added to groups. Sep 8, 2015 at 13:28

2 Answers 2

0

Simply:

usermod -aG wheel 'username'
1
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    Dec 27, 2022 at 13:31
-1

Just define the user in the sudoers file - should be the same effect as adding a user to the wheel group.

So as root/sudo, just run the following:

echo 'username ALL=(ALL) ALL' >> /etc/sudoers
1
  • 1
    i know that there are other ways for getting the permissions configured but i want to do this by adding it to the wheel.
    – Asaf Magen
    Sep 8, 2015 at 13:15

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .