You are not logged in.

#1 Yesterday 18:14:35

anon7x
Member
Registered: Yesterday
Posts: 5

[RESOLVED] deleted audit and now sudo does not work

I was attempting to update via pacman but found I could not because of conflicting dependencies

[minny@rocketpunch ~]$ sudo pacman -Syu
[sudo] password for minny:
:: Synchronizing package databases...
core                                                 126.4 KiB   342 KiB/s 00:00 [##############################################] 100%
extra                                                  8.5 MiB  3.08 MiB/s 00:03 [##############################################] 100%
multilib                                              82.7 KiB   274 KiB/s 00:00 [##############################################] 100%
chaotic-aur                                          658.4 KiB   342 KiB/s 00:02 [##############################################] 100%
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing audit (4.2.1-1) breaks dependency 'audit=4.1.4' required by lib32-audit

I was unsure how to solve this, so I tried to remove the audit package, but could not

[minny@rocketpunch ~]$ sudo pacman -Rn audit
checking dependencies...
error: failed to prepare transaction (could not satisfy dependencies)
:: removing audit breaks dependency 'audit' required by dbus
:: removing audit breaks dependency 'libaudit.so=1-64' required by dbus
:: removing audit breaks dependency 'audit' required by dbus-broker
:: removing audit breaks dependency 'libaudit.so=1-64' required by dbus-broker
:: removing audit breaks dependency 'audit' required by gdm
:: removing audit breaks dependency 'audit=4.1.4' required by lib32-audit
:: removing audit breaks dependency 'audit' required by libvirt
:: removing audit breaks dependency 'audit' required by networkmanager
:: removing audit breaks dependency 'audit' required by pam
:: removing audit breaks dependency 'libaudit.so=1-64' required by pam
:: removing audit breaks dependency 'audit' required by shadow
:: removing audit breaks dependency 'libaudit.so=1-64' required by shadow
:: removing audit breaks dependency 'audit' required by systemd

after that, I looked up how to delete a package that has a dependency error, and followed the advice of a forum post that said to use "--nodeps" in the RN line twice. That worked... but then I ran into a problem

[minny@rocketpunch ~]$ sudo pacman -Rn --nodeps --nodeps audit

Packages (1) audit-4.1.4-2

Total Removed Size:  1.01 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing audit                                                              [##############################################] 100%
:: Running post-transaction hooks...
(1/2) Reloading system manager configuration...
(2/2) Arming ConditionNeedsUpdate...
[minny@rocketpunch ~]$ sudo pacman -Syu
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/lib/sudo/sudoers.so: libaudit.so.1: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins

I am now unable to use sudo at all. I can't switch to root either, nor am I able to do any other manipulating for sudo...

[minny@rocketpunch ~]$ su root
su: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such file or directory
[minny@rocketpunch ~]$ su
su: error while loading shared libraries: libaudit.so.1: cannot open shared object file: No such file or directory
[minny@rocketpunch ~]$ sudo chmod 644 /usr/lib/sudo/sudoers.so
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/lib/sudo/sudoers.so: libaudit.so.1: cannot open shared object file: No such file or directory
sudo: fatal error, unable to load plugins

Not really sure what to do from here. I've been avoiding posting here as much as possible, but I think I may have made a very big mistake


EDIT: Used the following steps to fix my issue:
1. Got a USB with arch loaded on it in order to boot into a live environment
2. Followed steps as listed here*: https://wiki.archlinux.org/title/Pacman … an_upgrade
3. Rebooted, but ran into an issue where /boot would not mount
4. Booted into a live environment once more
5. Followed the steps listed here: https://wiki.archlinux.org/title/Genera … ken_system
6. Rebooted once again with no further issue as of writing

*When attempting to follow the 4th step listed in the linked page, I was unable to update due to conflicting packages. I removed those using pacman -Rdd, and thus far haven't had consequences, but would advise caution

Last edited by anon7x (Today 08:41:54)

Offline

#2 Yesterday 18:20:06

Whoracle
Member
Registered: 2010-11-02
Posts: 238

Re: [RESOLVED] deleted audit and now sudo does not work

did you reboot afterwards? audit is also a requirement of pam and systemd, so you'd better reinstall it. if you want to stop audit logging etc from happening, see https://wiki.archlinux.org/title/Audit_framework

Offline

#3 Yesterday 18:29:12

anon7x
Member
Registered: Yesterday
Posts: 5

Re: [RESOLVED] deleted audit and now sudo does not work

I have not rebooted as I was afraid I would not be able to login. I only wanted to update, and had no idea what either of those packages did

Offline

#4 Yesterday 18:40:48

Whoracle
Member
Registered: 2010-11-02
Posts: 238

Re: [RESOLVED] deleted audit and now sudo does not work

well, if you can't get root permissions or otherwise run pacman, reboot into a live usb, and install audit from there. you need that, and you basically removed all the safeguards that would have prevented you removing it. Your initial issue was caused by an aur-package (lib32-audit, orphaned) and instead of just removing THAT you removed the core dependency audit itself. So: Reboot into a live USB, reinstall audit from there, reboot into your system, remove lib32-audit. If you REALLY need lib32-audit, rebuild it afterwards against the new audit package. Your first try to remove audit has told you what damage you are going to impose, btw, so chalk that up to "learning" (we all make mistakes, it's OK), and get into the habit of reading what pacman and other programs tell you before forcing them to do your bidding wink

Do note that if you reboot and DON'T reinstall audit, you will not be able to log in. Your system as of now is broken, simple as that.

Last edited by Whoracle (Yesterday 18:41:21)

Offline

#5 Yesterday 18:41:26

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,372

Re: [RESOLVED] deleted audit and now sudo does not work

The proper fix would have been to just remove lib32-audit which got delegated to the AUR/dropped from the repos.

since this will have broken all ways to properly delegate, you either have to extract the package locally and properly pass an LD_LIBRARY_PATH/LD_PRELOAD or boot the live disk and do essentially https://wiki.archlinux.org/title/Pacman … an_upgrade to install audit.

Offline

#6 Today 06:34:34

anon7x
Member
Registered: Yesterday
Posts: 5

Re: [RESOLVED] deleted audit and now sudo does not work

V1del wrote:

The proper fix would have been to just remove lib32-audit which got delegated to the AUR/dropped from the repos.

since this will have broken all ways to properly delegate, you either have to extract the package locally and properly pass an LD_LIBRARY_PATH/LD_PRELOAD or boot the live disk and do essentially https://wiki.archlinux.org/title/Pacman … an_upgrade to install audit.


Posting from my phone. I am currently following the instructions from the wiki as per the link sent, but when I attempt to do the cachedir -syu part, I run into more issues. I do not know how to copy and paste from the live boot usb, but the errors are like"

Starting full system upgrade
resolving dependencies...
looking for conflicting packages...
error: failed to prepare transaction (could not satisfy dependencies)
:: installing expat (2.8.4-1) breaks dependency 'expat=2.8.2' required by lib32-expat
:: installing libelf (0.196-1) breaks dependency 'libelf=0.195' required by lib32-libelf
:: installing  libffi (3.8.0-1) breaks dependency 'libffi=3.7.1' required by lib32-libffi
:: installing  pcre2 (10.48-1) breaks dependency 'pcre2=10.47' required by lib32-pcre2


attempting to delete these packages gives me another long list of dependencies, and I am unable to do the -nodep thing as I am given the error "invalid option '-o'. I figured it may not be smart to make the same mistake twice, but I cannot even boot into my install at the moment. Unsure where to go from here

Offline

#7 Today 06:52:23

GerBra
Forum Fellow
From: Bingen/Germany
Registered: 2007-05-10
Posts: 285

Re: [RESOLVED] deleted audit and now sudo does not work

anon7x wrote:

attempting to delete these packages gives me another long list of dependencies

I have the feeling you still don't understand what these messages really mean.

:: installing  pcre2 (10.48-1) breaks dependency 'pcre2=10.47' required by lib32-pcre2

The problematic package  - which make the update impossible - is always[¹] the last part.
This (current!) installed lib32-pcre2 package(version) is "your" problem. You have to handle with this/these to get a step further.

//Edit: Background
Many of these lib32-* packages where in the [multilib] repo, so they update proper when the x86_64 "parent" package gots upgraded (pcre2 <-> lib32pcre2).
Now these lib32-* packages where removed from [multilib], they have gone to the AUR, cause they are not more required by any package in the official repositories.
You have to uninstall these packages, perform a full system upgrade and then:
Check if any other of your installed **foreign packages** (mostly AUR packages you have builded) still require these (now also foreign) lib32-* packages.
Mostly they don't, but when you have to get/build them from AUR (and then in relation to the currently installed official, system "parent" it belongs to).

//Edit2:
[¹] In an normal pacman system upgrade procedure(-Syu) with only official repositories (without any *-testing repo currently or before enabled).

Last edited by GerBra (Today 07:19:58)


My avatar: "It's not just a toilet... a FERGUSON. The King of bowls. Sit down and give me your best shot." Al Bundy

Offline

#8 Today 07:24:27

anon7x
Member
Registered: Yesterday
Posts: 5

Re: [RESOLVED] deleted audit and now sudo does not work

I ended up deleting the packages and proceeding with the updates and all. I installed audit successfully and then rebooted. Unfortunately, I now have another error where /boot cannot be mounted an I have to login with my root password. I wrote that down but evidently I did not write the correct password as I am not able to login. The password issue is one for me to solve personally, but I am not sure why /boot does not mount

Offline

#9 Today 07:33:53

GerBra
Forum Fellow
From: Bingen/Germany
Registered: 2007-05-10
Posts: 285

Re: [RESOLVED] deleted audit and now sudo does not work

> Unfortunately ...

Most times this comes from that on your extern boot setup your EFI/ESP partition was not mounted when you perform the -Syu on/in chroot - and you got also a kernel upgrade in this step.

Go back into the extern boot procedure (where you fixed your audit problem), and make sure that when mounting your (arch) partitions to /mnt you also mount your EFI/ESP partition to /mnt/boot. If unsure if you mount ESP to /boot in original setup look an /mnt/etc/fstab.
If **all** (system and EFI/ESP) partitons are mounted then chroot into /mnt and install your kernel package again:

pacman -S linux # if using the linux kernel package as kernel, modify if using other kernel

Leave chroot and try a real boot of your archlinux system.

//Edit: Updated the command given above!!!!

//Edit: Look here:
https://wiki.archlinux.org/title/Genera … ken_system
on the noted steps (the mount and arch-chroot parts) what are the pre-requited things are.

Last edited by GerBra (Today 07:48:48)


My avatar: "It's not just a toilet... a FERGUSON. The King of bowls. Sit down and give me your best shot." Al Bundy

Offline

#10 Today 08:16:41

anon7x
Member
Registered: Yesterday
Posts: 5

Re: [RESOLVED] deleted audit and now sudo does not work

Everything works now! I am typing from my install. Thank you very much for the help!! I have learned a lot and have much to think about

Offline

#11 Today 08:20:39

GerBra
Forum Fellow
From: Bingen/Germany
Registered: 2007-05-10
Posts: 285

Re: [RESOLVED] deleted audit and now sudo does not work

>  I have learned a lot and have much to think about

Problems could lead to wisdom if you accept them <g>

Stolen from @seth:
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.


My avatar: "It's not just a toilet... a FERGUSON. The King of bowls. Sit down and give me your best shot." Al Bundy

Offline

#12 Today 08:26:33

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,372

Re: [RESOLVED] deleted audit and now sudo does not work

You're also advised to occasionally check and clean your orphans: https://wiki.archlinux.org/title/System … d_packages -- there are no announcements when unneeded packages are dropped from the repos and that's basically what happened here

Offline

Board footer

Powered by FluxBB