Re: sudo privileges

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi George,
thank you for answering me..

Yes I have two user name how you said
what you say is right:
<"You should not need to be in the wheel group if your username is in "/etc/sudoers"">.

My name was not , at the moment that I had the problem, in the sudoers file .
Later I added it , and this wast enough to gain again the sudo privileges..

Probably the cancellation was caused by the command
<sudo usernod -G audio <my_name> 

Now the problem is solved, as well it seems me strange that adding a new group to a user should delete it from the list of sudoers

Again thank you to all that tried to help me

Angelo


On Sun, Dec 27, 2020 at 5:10 PM Qiyu Yan <yanqiyu@xxxxxxxxxxxxxxxxx> wrote:
George N. White III <gnwiii@xxxxxxxxx> 于2020年12月27日周日 下午10:28写道:
>
> On Sun, 27 Dec 2020 at 05:32, Angelo Moreschini <mrangelo.fedora@xxxxxxxxx> wrote:
>>
>> Hi
>>
>> some days before, I had a problem about using  the "beep" function..
>> ... working around, to solve my problem, I got the suggestion to register myself in the "audio group" ..
>> I made it using these commands:
>>
>> sudo adduser <my_name> audio
>
>
> This  should have given a usage error:
>
> Usage: adduser [options] LOGIN
>        adduser -D
>        adduser -D [options]
>>
>>  and also :
>> sudo usernod -G audio <my_name>
>
>
> I assume this was  "sudo usermod -G audio <my_name>".   This will replace the list of
> supplementary groups with just "audio", which will remove sudo privileges.  You need
> "--append" (or "-a") to append "audio" to the supplementary groups.
>
>
> What did you use for <my_name>?   You seem to have two user names:
> "angelo_user" and "angelo_dev".
>
>>
>>
>>
>> Actually (after this)  I no longer have (I lose the) sudo privileges (I think, in consequence of these actions).
>> As well my name still appears inside the /etc/sudoers/ file..,
>>
>> ## Allow root to run any commands anywhere
>>
>> root ALL=(ALL) ALL
>>
>> angelo_user ALL=(ALL) ALL
>>
>> (but i am not anymore in the wheel group)
>
>
> If you no longer have a login with sudo privileges you will need to boot
> another system (e.g., a live distro from a USB key) to
>>
>>
>> When i try to use the sudo privileges, I get the message :
>> <"angelo_dev is not in the sudoers file.  This incident will be reported.">
>
>
> Check the list of groups for "id", "id angelo_dev" and "id anglo_user".
>
>>
>>
>> In conclusion :
>>
>> I am still registered in the /etc/sudoers file
>> I am not anymore registered in the wheel group.
>>
>> I think it could be enough  to register me in the "wheel" group again,  in order to still get the sudo privileges, but I am not completely sure about this :
>> ....because to be registered in /etc/sudoers is not enough ??...
>> (how it works the management of sudo privileges  ? )
>
>
> You should not need to be in the wheel group if your username is in "/etc/sudoers".
I an in doubt of this, PolicyKit things don't respect sudoers file,
IIRC. So if you are in sudoers but not wheel, you will have problem in
some GUI apps or systemctl commands.

I think in this case, just adding yourself in wheels by sudo usernod
-G -a will be enough.
>>
>>
>> I would like sono help
>>
>> tank you
>> regards
>>
>> Angelo
>> _______________________________________________
>> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
>> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
>> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
>> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
>> List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
>
>
>
> --
> George N. White III
>
> _______________________________________________
> users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
> To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
> Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
> List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
> List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux