0

This warning occurs even with the following line in my sudoers file:

User_Alias      ADMINS = tom

Removing the line eliminates the warning.

Adding tom to the wheel group appears to be sufficient to enable sudo commands, but the vagaries of whether completely logging out is required make experimentation cumbersome.

I'm using OpenSuse Leap.

I would appreciate any insight into this confusing situation.

2
  • The warning is telling you that the alias is not used anywhere. Is it? Probably not, perhaps you removed the rule using it earlier. If you add a line User_Alias NOTUSED = whatever then you'll also geta warning about that. So what is confusing you about this? It's just a warning that you for some reason have defined an alias but perhaps then forgot use it in a rule.
    – wurtel
    Jan 24, 2018 at 9:51
  • Used as in: part of a user-to-command rule
    – Jeff Schaller
    Jan 24, 2018 at 10:17

1 Answer 1

2

You have correctly identified the cause and effect. visudo performs several "sanity checks" on the sudoers file in order to prevent some number of innocent mistakes.

Perhaps you intended to provide some sudo commands to the ADMINS, and got distracted after entering the User_Alias and before entering the actual commands. Or perhaps you were cleaning up old entries and had deleted the command entries but forgot the User_Alias.

visudo is simply telling you that you have defined a User, Runas, Host, or Cmnd alias but have not used that alias in any actual sudo command rules.

If you intend for tom (or, the ADMINS) to be able to run some commands, enter those. If you have scratched your itch by adding tom to the wheel group, simply remove the ADMINS User_Alias, and the warning will go away.

1
  • I'd have to do some research to find out how to enter the commands, so I'll just consider my itch scratched. LOL. I'll just have to hope that running a desktop session on an Internet-connected computer with user tom in the wheel group doesn't hose me. Feb 9, 2018 at 8:03

You must log in to answer this question.

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