alexheretic / aurto

Arch Linux AUR tool for managing an auto-updating local 'aurto' package repository
MIT License
137 stars 9 forks source link

update-aurto password is required #54

Closed PoisonousJohn closed 3 years ago

PoisonousJohn commented 3 years ago

Hi, installed aurto and made aurto init. Yet it fails to update packages with the following error:

  -- Journal begins at Wed 2020-10-14 12:48:22 MSK, ends at Fri 2021-02-26 14:27:48 MSK. --
  Feb 26 13:33:32 jp-laptop.local.domain update-aurto[114403]:  Using [aurto] repository
  Feb 26 13:33:34 jp-laptop.local.domain update-aurto[114403]:  Using [aurto] repository wee-slack: 2.6.0-1 -> 2.7.0-1
  Feb 26 13:33:34 jp-laptop.local.domain update-aurto[114403]:  Retrieving package files
  Feb 26 13:33:34 jp-laptop.local.domain update-aurto[114403]:  Retrieving package files Cloning into 'wee-slack'...
  Feb 26 13:33:35 jp-laptop.local.domain update-aurto[114403]:  Retrieving package files Running aur chroot --create --makepkg-conf /etc/aurto/makepkg-chroot.conf --pacman-conf /etc/aurto/pacman-chroot.conf
  Feb 26 13:33:35 jp-laptop.local.domain update-aurto[114403]:  Retrieving package files Running aur chroot --update --makepkg-conf /etc/aurto/makepkg-chroot.conf --pacman-conf /etc/aurto/pacman-chroot.conf
  Feb 26 13:33:35 jp-laptop.local.domain sudo[114597]: pam_unix(sudo:auth): conversation failed
  Feb 26 13:33:35 jp-laptop.local.domain sudo[114597]: pam_unix(sudo:auth): auth could not identify password for [jp]

What did I do wrong?

alexheretic commented 3 years ago

update-aurto uses sudo -u "$user" to run aurutils, where $user is the user that ran aurto init.

Aurutils can also invoke sudo to get root access, in this case probably https://github.com/AladW/aurutils/blob/ad5b985e606caa4a3ac8ab99d6f9849a6286b708/lib/aur-chroot#L165.

To support this aurto installs some sudoers config at /etc/sudoers.d/50_aurto_passwordless for wheel group users.

It's possible your other sudoers/auth config could be conflicting with this. Or maybe your user is not in the wheel group?

PoisonousJohn commented 3 years ago

Or maybe your user is not in the wheel group?

This is the case, thanks! Could not figure it out by looking at 50_aurto_passwordless