Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

I have no name! and libs not found as user - sys borked 100%

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
6 posts • Page 1 of 1
Author
Message
I have no name!
n00b
n00b
Posts: 3
Joined: Sun Jun 04, 2023 3:17 am
Location: I have no location!

I have no name! and libs not found as user - sys borked 100%

  • Quote

Post by I have no name! » Sun Jun 04, 2023 3:59 am

Hi, while I was logged into my DE I stopped being able to run any programs; thankfully I had an open xfce terminal to try to run apps from and I could see immediately that any program that tried to call a library would result in a 'no such file' error. For example:

Code: Select all

I have no name! in ~ at 03:26:03
2005 $ jgmenu
jgmenu: error while loading shared libraries: libgcc_s.so.1: cannot open shared object file: No such file or directory
I cannot run `locate` as my normal user because it results in 'permission denied' but running it as root shows that the following generic folders contain it:

Code: Select all

/usr/lib/gcc/x86_64-pc-linux-gnu/12/libgcc_s.so.1
/usr/lib/gcc/x86_64-pc-linux-gnu/12/32/libgcc_s.so.1
However I can see most directories from my user:

Code: Select all

I have no name! in ~ at 03:27:27
2008 $ ls -ld /
drwxr-xr-x 1 0 0 156 Jun  3 22:53 /
But you'll notice that I don't see any usernames, ever. It's IDs - on all files, all the times, even when I run `groups` - it returns the group IDs and not the group names that I'm used to. So my day to day user account can't see any user/group names, only IDs. Thankfully I have a root user who's able to see user/group names and can operate the system normally... mostly.

My DE does not start as usual. It provides a cursor on a black screen. Even running `sddm` manually results in the same. So the issue must extend farther than my user account becoming corrupt. Both my home drive and root are on btrfs filesystems so I've run `btrfs check --force <fs>` and neither results in any issues found and after a reboot the system remains the same. I backed up my user folder with rsync so I can restore it completely just in case.

When logging into a normal system, my user unlocks some encrypted drives via /etc/security/pam.conf.xml - so the login process (from command line) MUST be able to read the root FS, or at the very least, the root FS continues to operate as normal... However, there is an unfortunate peculiarity - when attempting to reinstall PAM I got the error:

Code: Select all

 # emerge -1av sys-devel/gcc --usepkg n

These are the packages that would be merged, in order:

Calculating dependencies... done!
Dependency resolution took 2.00 s.

[ebuild   R    ] sys-devel/gcc-12.2.1_p20230428-r1:12::gentoo  USE="(cxx) fortran graphite lto (multilib) nls nptl openmp (pie) sanitize ssp -ada (-cet) (-custom-cflags) -d -debug -default-stack-clash-protection -default-znow -doc (-fixed-point) -go -hardened (-ieee-long-double) -jit (-libssp) -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv -zstd" 0 KiB

Total: 1 package (1 reinstall), Size of downloads: 0 KiB

Would you like to merge these packages? [Yes/No] y

>>> Verifying ebuild manifests

>>> Running pre-merge checks for sys-devel/gcc-12.2.1_p20230428-r1

>>> Emerging (1 of 1) sys-devel/gcc-12.2.1_p20230428-r1::gentoo
 * gcc-12-20230428.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                     [ ok ]  * gcc-12.3.0-patches-2.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                                [ ok ]
 * gcc-12.3.0-musl-patches-1.tar.xz BLAKE2B SHA512 size ;-) ...                                                                                                                                           [ ok ]
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:                                                                   (sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:                                                                   (sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
...
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/file.c, function rc_ls_dir(), line 100:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.d' is not a directory.
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/file.c, function rc_ls_dir(), line 100:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.d' is not a directory.
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/file.c, function rc_ls_dir(), line 100:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.d' is not a directory.
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/config.c, function rc_get_cnf_entry(), line 35:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.conf' is not a file or does not exist!
(sandbox) error: in /portage/tmp/portage/sys-apps/sandbox-2.29/work/sandbox-2.29/libsbutil/src/file.c, function rc_ls_dir(), line 100:
(sandbox)        strerror() = 'No such file or directory'
(sandbox)        '/etc/sandbox.d' is not a directory.
 * ACCESS DENIED:  open_wr:       /dev/tty
 * ACCESS DENIED:  open_wr:       /dev/tty
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/ebuild.sh: line 11: /dev/null: Permission denied
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 912: /dev/null: Permission denied
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 914: /dev/null: Permission denied
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 916: /dev/null: Permission denied
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 918: /dev/null: Permission denied
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 920: /dev/null: Permission denied
...
>>> Unpacking source...
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 216: /dev/null: Permission denied
>>> Source unpacked in /portage/tmp/portage/sys-devel/gcc-12.2.1_p20230428-r1/work
 * ACCESS DENIED:  open_wr:       /dev/null
/usr/lib/portage/python3.11/phase-functions.sh: line 216: /dev/null: Permission denied
chgrp: invalid group: ‘portage’
Permission denied: '/etc/portage/color.map'
portage: 'portage' user or group missing.
         For the defaults, line 1 goes into passwd, and 2 into group.
         portage:x:250:250:portage:/var/tmp/portage:/bin/false
         portage::250:portage
*** WARNING ***  For security reasons, only system administrators should be
*** WARNING ***  allowed in the portage group.  Untrusted users or processes
*** WARNING ***  can potentially exploit the portage group for attacks such as
*** WARNING ***  local privilege escalation.

 * ----------------------- SANDBOX ACCESS VIOLATION SUMMARY -----------------------
 * LOG FILE: "/portage/tmp/portage/sys-devel/gcc-12.2.1_p20230428-r1/temp/sandbox.log"
 *
VERSION 1.0
FORMAT: F - Function called
FORMAT: S - Access Status
FORMAT: P - Path as passed to function
FORMAT: A - Absolute Path (not canonical)
FORMAT: R - Canonical Path
FORMAT: C - Command Line

F: open_wr
S: deny
P: /dev/null
A: /dev/null
R: /dev/null
C: bash /usr/lib/portage/python3.11/ebuild.sh unpack

F: open_wr
S: deny
P: /dev/null
A: /dev/null
R: /dev/null
C: bash /usr/lib/portage/python3.11/ebuild.sh unpack

F: open_wr
S: deny
P: /dev/null
A: /dev/null
R: /dev/null
C: bash /usr/lib/portage/python3.11/ebuild.sh unpack

F: open_wr
S: deny
P: /dev/null
A: /dev/null
R: /dev/null
C: bash /usr/lib/portage/python3.11/ebuild.sh unpack
...
F: open_wr
S: deny
P: /dev/null
A: /dev/null
R: /dev/null
C: bash /usr/lib/portage/python3.11/ebuild.sh unpack
 * --------------------------------------------------------------------------------

>>> Failed to emerge sys-devel/gcc-12.2.1_p20230428-r1, Log file:

>>>  '/portage/log/sys-devel:gcc-12.2.1_p20230428-r1:20230604-035253.log'
This error repeats no matter what atom I try to emerge. I can use u--usepkg y` to try to get around this but no atom I install seems to fix whatever the underlying issue is.

There are no indicators of errors in log files - even the SDDM log says "session started" and in the same second, "session disconnected" even though a mouse cursor continues to exist and is movable.

The only thing I did prior to this was install xhost so I could allow a second user to run programs on my x session. I added that user via `xhost +SI:localuser:UserName` and then tested it with `sudo -u UserName thunar` which worked perfectly, and then the system operated normally for a while before I stopped being able to run any program.


Sadly I can't use wgetpaste either:

Code: Select all

# cat /portage/log/app-text\:wgetpaste-2.33-r1\:20230604-035652.log
bash: /etc/spork/is/not/valid/profile.env: Permission denied
Process Process-3:
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/portage/util/__init__.py", line 646, in _recursive_file_list
    st = os.stat(fullpath)
         ^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/__init__.py", line 281, in __call__
    rval = self._func(*wrapped_args, **wrapped_kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: b'/etc/portage/mirrors'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.11/multiprocessing/process.py", line 314, in _bootstrap
    self.run()
  File "/usr/lib/python3.11/multiprocessing/process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3.11/site-packages/portage/util/_async/ForkProcess.py", line 163, in _bootstrap
    sys.exit(self._run())
             ^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/_emerge/EbuildFetcher.py", line 274, in _run
    if fetch(
       ^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/package/ebuild/fetch.py", line 911, in fetch
    custommirrors = grabdict(
                    ^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/util/__init__.py", line 426, in grabdict
    for x in grablines(myfilename, recursive):
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/portage/util/__init__.py", line 674, in grablines
    for f in _recursive_file_list(myfilename):
  File "/usr/lib/python3.11/site-packages/portage/util/__init__.py", line 648, in _recursive_file_list
    onerror(e)
  File "/usr/lib/python3.11/site-packages/portage/util/__init__.py", line 637, in onerror
    raise PermissionDenied(path)
portage.exception.PermissionDenied: /etc/portage/mirrors
 * Fetch failed for 'app-text/wgetpaste-2.33-r1', Log file:
 *  '/portage/log/app-text:wgetpaste-2.33-r1:20230604-035652.log'

Another interesting thing to note is how I see the FS:

Code: Select all

I have no name! in ~ at 04:00:27
2012 $ ls -l /etc/security -d
ls: cannot access '/etc/security': Permission denied

Code: Select all

I have no name! in ~ at 04:00:33
2013 $ sudo ls -l /etc/security -d

We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:

    #1) Respect the privacy of others.
    #2) Think before you type.
    #3) With great power comes great responsibility.

For security reasons, the password you type will not be visible.

SSH passphrase:
drwxr-xr-x 1 root root 346 Jun  3 20:09 /etc/security
It has +rx on everyone!! But my normal user can't see it!!

I welcome ALL help, please let know what I can do to gather more information to reach a solution - as I'm at the point where I feel like wiping the partition and reinstalling OS is the only solution.
Top
NeddySeagoon
Administrator
Administrator
User avatar
Posts: 56071
Joined: Sat Jul 05, 2003 9:37 am
Location: 56N 3W

  • Quote

Post by NeddySeagoon » Sun Jun 04, 2023 2:21 pm

I have no name!,

Welcome to the forums.

Do you have

Code: Select all

$ ls -l /etc/group
-rw-r--r-- 1 root root 800 May 21  2022 /etc/group
ls -l /etc/passwd
-rw-r--r-- 1 root root 1736 May 21  2022 /etc/passwd
and are the permissions correct?

Note, there are no password hashes in /etc/passwd. They are in

Code: Select all

$ ls -l /etc/shadow
-rw-r----- 1 root root 839 May 21  2022 /etc/shadow
which is only accessible to applications running as root.
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Top
I have no name!
n00b
n00b
Posts: 3
Joined: Sun Jun 04, 2023 3:17 am
Location: I have no location!

  • Quote

Post by I have no name! » Sun Jun 04, 2023 2:50 pm

Thank you for the reply!

Code: Select all

I have no name! in ~ at 02:45:55
2040 $ ls -lda /etc/passwd /etc/group /etc/shadow /etc /
ls: cannot access '/etc/passwd': Permission denied
ls: cannot access '/etc/group': Permission denied
ls: cannot access '/etc/shadow': Permission denied
drwxr-xr-x 1 0 0  156 Jun  4 06:00 /
drwxr-xr-- 1 0 0 3574 Jun  4 14:23 /etc
Suspiciously lacking that o+x, but I'm not want to change anything without external advice, since I do not remember ever making any changes to such a vital folder to begin with.

Edit: I mean, that's fixed it, but... what changed it? xhost and lxqt-admin-user were the only two things I ran around that time... ??? ? ??
Last edited by I have no name! on Sun Jun 04, 2023 3:34 pm, edited 1 time in total.
Top
Hu
Administrator
Administrator
Posts: 24380
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jun 04, 2023 3:33 pm

/etc should normally have world-search. As you found, many things are broken without it. Granting world-read on /etc is traditional, but probably not necessary to solve your problem.
Top
I have no name!
n00b
n00b
Posts: 3
Joined: Sun Jun 04, 2023 3:17 am
Location: I have no location!

  • Quote

Post by I have no name! » Sun Jun 04, 2023 3:39 pm

Hu wrote:/etc should normally have world-search. As you found, many things are broken without it. Granting world-read on /etc is traditional, but probably not necessary to solve your problem.
I wouldn't think so either; but that fixed it. Is there somewhere in /etc where library locations are defined? That was the first "issue" I ever noticed - programs wouldn't find any libs despite /usr/lib64 being intact.

I'm going to mark this as solved since everything is back up and running even despite not yet knowing why it occurred.
Top
GDH-gentoo
Advocate
Advocate
User avatar
Posts: 2110
Joined: Sat Jul 20, 2019 7:02 pm
Location: South America

  • Quote

Post by GDH-gentoo » Sun Jun 04, 2023 3:56 pm

I have no name! wrote:Is there somewhere in /etc where library locations are defined?
GNU libc's dynamic linker does use /etc/ld.so.conf and /etc/ld.so.cache to find the shared libraries needed by the programs that you run, yes.
NeddySeagoon wrote:I'm not a witch, I'm a retired electronics engineer :)
Ionen wrote:As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though :)
Top
Post Reply

6 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy