[Résolu][Sudoers] %wheel ALL=(ALL) NOPASSWD: ALL

Mise à jour / Création /debug de paquetages
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

[Résolu][Sudoers] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Bonjour à tous,

Ma configuration de /etc/sudoers est modifié par visudo en root au niveau de : %wheel ALL=(ALL) NOPASSWD: ALL
J'ai une de mes install de Arch qui fait de la résistance et poutant j'utilse toujours le même guide d'installation.
J'aimerais comprendre ce qui ne vas pas
Dernière modification par Breizil29 le sam. 17 déc. 2022, 13:31, modifié 3 fois.
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Bonjour,
Je ne vois pas le lien entre %wheel ALL=(ALL) NOPASSWD: ALL et le fichier /etc/pacman.conf
Une telle ligne devrait être placé dans le fichier / dossier sudoers

Note : La ligne %wheel ALL=(ALL) NOPASSWD: ALL enlève toute sécurité. Je déconseille vivement de faire une telle chose avec sudo
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
papajoke
Elfe
Messages : 779
Inscription : sam. 30 août 2014, 19:54

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par papajoke »

bonjour

Génial ton guide :mrgreen:
Tu peux voir à quel paquet appartient ton fichier

Code : Tout sélectionner

pacman -Qo /etc/le_fichier
réinstaller ce paquet va créer le même fichier avec l'extension ".pacnew" qui est l'original archlinux

Il ne te reste qu'à corriger le mauvais fichier suivant le .pacnew
Arch stable - Kde 5 / zsh - btrfs/mbr - Intel Core i3 - 6Go RAM - GeForce 405 video-nouveau
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Benjarobin a dit :
Je ne vois pas le lien entre %wheel ALL=(ALL) NOPASSWD: ALL et le fichier /etc/pacman.conf
Désolé, je voulais dire /etc/sudoers évidemment.
Benjarobin a dit :
Note : La ligne %wheel ALL=(ALL) NOPASSWD: ALL enlève toute sécurité. Je déconseille vivement de faire une telle chose avec sudo
Je sais, c'est ce que je veux.
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Et donc c'est quoi le problème ? Peux tu détailler ?
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Décidemment ma description du problème est vraiment pourri, ce qui ne vas pas est qu'on me demande tjs mon MP
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Depuis ton utilisateur, quelle est la sortie de la commande : id
Ou dit autrement est ce que tu es dans le groupe wheel ?
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Code : Tout sélectionner

id  
uid=1000(gg) gid=1000(gg) groups=1000(gg),998(wheel)
Je vourais que ce soit comme ça :

Code : Tout sélectionner

 id
uid=1000(gg) gid=1000(gg) groups=1000(gg),3(sys),19(log),982(rfkill),985(video),987(storage),991(lp),994(input),996(audio),998(wheel),999(adm)
Je connais que :
useradd -m -G audio,video,input,wheel,sys,log,storage,rfkill,lp,adm -s /bin/zsh gg
Et évidemment ça ne marche pas car c'est pour créer et moi je veux ajouter ce qui manque par rapport a la deuxième ligne.
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Code : Tout sélectionner

usermod -aG groupe1,groupe2 user
Et si sudo demande toujours le mot de passe pour l'utilisateur "gg", peux tu donner l'intégralité de ton fichier sudoers
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Code : Tout sélectionner

Root gg # usermod -aG groupe1,groupe2 user
usermod: group 'groupe1' does not exist
usermod: group 'groupe2' does not exist
Archlinux gg # q
exit
 gg  ~  usermod -aG groupe1,groupe2 user                               
usermod: group 'groupe1' does not exist
usermod: group 'groupe2' does not exist
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Euh, c’était un exemple...
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Code : Tout sélectionner

## sudoers file.
##
## This file MUST be edited with the 'visudo' command as root.
## Failure to use 'visudo' may result in syntax or file permission errors
## that prevent sudo from running.
##
## See the sudoers man page for the details on how to write a sudoers file.
##

##
## Host alias specification
##
## Groups of machines. These may include host names (optionally with wildcards),
## IP addresses, network numbers or netgroups.
# Host_Alias    WEBSERVERS = www1, www2, www3

##
## User alias specification
##
## Groups of users.  These may consist of user names, uids, Unix groups,
## or netgroups.
# User_Alias    ADMINS = millert, dowdy, mikef

##
## Cmnd alias specification
##
## Groups of commands.  Often used to group related commands together.
# Cmnd_Alias    PROCESSES = /usr/bin/nice, /bin/kill, /usr/bin/renice, \
#                           /usr/bin/pkill, /usr/bin/top
# Cmnd_Alias    REBOOT = /sbin/halt, /sbin/reboot, /sbin/poweroff

##
## Defaults specification
##
## You may wish to keep some of the following environment variables
   ## when running commands via sudo.
##
## Locale settings
# Defaults env_keep += "LANG LANGUAGE LINGUAS LC_* _XKB_CHARSET"
##
## Run X applications through sudo; HOME is used to find the
## .Xauthority file.  Note that other programs use HOME to find
## configuration files and this may lead to privilege escalation!
# Defaults env_keep += "HOME"
##
## X11 resource path settings
# Defaults env_keep += "XAPPLRESDIR XFILESEARCHPATH XUSERFILESEARCHPATH"
##
## Desktop path settings
# Defaults env_keep += "QTDIR KDEDIR"
##
## Allow sudo-run commands to inherit the callers' ConsoleKit session
# Defaults env_keep += "XDG_SESSION_COOKIE"
##
## Uncomment to enable special input methods.  Care should be taken as
## this may allow users to subvert the command being run via sudo.
# Defaults env_keep += "XMODIFIERS GTK_IM_MODULE QT_IM_MODULE QT_IM_SWITCHER"
##
## Uncomment to use a hard-coded PATH instead of the user's to find commands
# Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
##
## Uncomment to send mail if the user does not enter the correct password.
# Defaults mail_badpass
##                                                  
##
## Uncomment to enable logging of a command's output, except for
## sudoreplay and reboot.  Use sudoreplay to play back logged sessions.
## Sudo will create up to 2,176,782,336 I/O logs before recycling them.
## Set maxseq to a smaller number if you don't have unlimited disk space.
# Defaults log_output
# Defaults!/usr/bin/sudoreplay !log_output
# Defaults!/usr/local/bin/sudoreplay !log_output
# Defaults!REBOOT !log_output
# Defaults maxseq = 1000

##
## Runas alias specification
##

##
## User privilege specification
##
root ALL=(ALL:ALL) ALL

## Uncomment to allow members of group wheel to execute any command
# %wheel ALL=(ALL:ALL) ALL

## Same thing without a password
%wheel ALL=(ALL:ALL) NOPASSWD: ALL

## Uncomment to allow members of group sudo to execute any command
# %sudo ALL=(ALL:ALL) ALL

## Uncomment to allow any user to run sudo if they know the password
## of the user they are running the command as (root by default).
# Defaults targetpw  # Ask for the password of the target user
# ALL ALL=(ALL:ALL) ALL  # WARNING: only use this together with 'Defaults targetpw'

## Read drop-in files from /etc/sudoers.d

- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Euh, c’était un exemple...
Ok laisse tombé pour l'instant je vais essayé tous seul de faire ce que je veux
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Code : Tout sélectionner

 gg  ~  id
uid=1000(gg) gid=1000(gg) groups=1000(gg),3(sys),19(log),982(rfkill),985(video),987(storage),991(lp),994(input),996(audio),998(wheel),999(adm)
ça c'est bon, mais même après redémarrage il me demande tjs mon MP
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Peux tu faire ceci, et en donner la sortie (en root) :

Code : Tout sélectionner

ls -la /etc/sudoers /etc/sudoers.d
curl -F'file=@/etc/sudoers' -Fexpires=72 https://0x0.st
cat /etc/sudoers.d/* | curl -F 'file=@-' -Fexpires=72 https://0x0.st
id gg
Il te demande ton mot de passe quand tu fait sudo -i ?
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Il te demande ton mot de passe quand tu fait sudo -i ?
Non yay ou paru
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Peux tu donner la sortie des commandes demandées, cela pourrait aider. Tu exécutes yay avec ton utilisateur gg ?
Peux tu vraiment expliquer en détail ton problème, car depuis le début j'essaye de deviner, savoir que sudo fonctionne mais avec yay non cela peut aider. Donc si tu as d'autres détails, sorties intéressantes à donner...
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Code : Tout sélectionner

[u]Archlinux gg #[/u] ls -la /etc/sudoers /etc/sudoers.d
-r--r----- 1 root root 3317 Dec 16 21:29 /etc/sudoers

/etc/sudoers.d:
total 12
drwxr-x---  2 root root 4096 Dec  6 10:35 .
drwxr-xr-x 83 root root 4096 Dec 16 21:35 ..
-r--r-----  1 root root   17 Dec  6 10:35 00_gg
[u]Archlinux gg # [/u]curl -F'file=@/etc/sudoers' -Fexpires=72 https://0x0.st
https://0x0.st/onDv.txt
[u]Archlinux gg #[/u] cat /etc/sudoers.d/* | curl -F 'file=@-' -Fexpires=72 https://0x0.st
https://0x0.st/onDw.txt
[u]Archlinux gg #[/u] id gg
uid=1000(gg) gid=1000(gg) groups=1000(gg),3(sys),19(log),999(adm),998(wheel),996(audio),994(input),991(lp),987(storage),985(video),982(rfkill)
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
Breizil29
yeomen
Messages : 229
Inscription : dim. 13 juin 2021, 15:04

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par Breizil29 »

Code : Tout sélectionner

Tu exécutes yay avec ton utilisateur gg ?
Oui yay alias de yay -Syu
Et avec sudo pacman -Syu, c'est pareil or que sur mes 3 autres install je fais les mise à jour sans problème et sans MP
Dernière modification par Breizil29 le ven. 16 déc. 2022, 23:24, modifié 1 fois.
- Desktop - Arch Linux x86_64
CPU : i7-12700KF
GPU: NVIDIA T600
Audio : SSL 2+610
- Desktop - Arch Linux x86_64
CPU : Intel® Pentium® G4560
GPU : Intel HD graphics 610
- Laptop -HP Compaq 6830s - Arch Linux x86_64
CPU : Intel® Core™2 Duo T5870 × 2
GPU : AMD RV620
Avatar de l’utilisateur
benjarobin
Maître du Kyudo
Messages : 17222
Inscription : sam. 30 mai 2009, 15:48
Localisation : Lyon

Re: [Pacman.conf] %wheel ALL=(ALL) NOPASSWD: ALL

Message par benjarobin »

Supprime le fichier 00_gg et dis moi si cela améliore les choses. Ce fichier est inutile.
Zsh | KDE | PC fixe : core i7, carte nvidia
Titre d'un sujet : [Thème] Sujet (état) / Règles du forum
Répondre