Hallo,
ich habe in einem Chroot mittels
pacstrap ein minimales Build-System auf meinem bestehenden Arch-System aufgesetzt.
Das sieht (von innerhalb des Chroot) so aus:
pacman -Qq
acl
archlinux-keyring
attr
bash
bzip2
ca-certificates
ca-certificates-cacert
ca-certificates-mozilla
ca-certificates-utils
coreutils
cracklib
curl
db
e2fsprogs
expat
filesystem
findutils
gcc-libs
gdbm
glib2
glibc
gmp
gnupg
gnutls
gpgme
iana-etc
icu
keyutils
krb5
libarchive
libassuan
libcap
libffi
libgcrypt
libgpg-error
libidn
libksba
libldap
libpsl
libsasl
libsecret
libssh2
libsystemd
libtasn1
libtirpc
libunistring
libutil-linux
linux-api-headers
lz4
lzo
ncurses
nettle
npth
openssl
p11-kit
pacman
pacman-mirrorlist
pam
pambase
pcre
perl
pinentry
readline
shadow
sqlite
tzdata
util-linux
xz
zlib
cat /etc/passwd
root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/bin:/usr/bin/nologin
daemon:x:2:2:daemon:/:/usr/bin/nologin
mail:x:8:12:mail:/var/spool/mail:/usr/bin/nologin
ftp:x:14:11:ftp:/srv/ftp:/usr/bin/nologin
http:x:33:33:http:/srv/http:/usr/bin/nologin
uuidd:x:68:68:uuidd:/:/usr/bin/nologin
dbus:x:81:81:dbus:/:/usr/bin/nologin
nobody:x:99:99:nobody:/:/usr/bin/nologin
systemd-journal-gateway:x:191:191:systemd-journal-gateway:/:/usr/bin/nologin
systemd-timesync:x:192:192:systemd-timesync:/:/usr/bin/nologin
systemd-network:x:193:193:systemd-network:/:/usr/bin/nologin
systemd-bus-proxy:x:194:194:systemd-bus-proxy:/:/usr/bin/nologin
systemd-resolve:x:195:195:systemd-resolve:/:/usr/bin/nologin
build:x:1000:1000::/home/build:/bin/bash
ls -alF /home
total 12
drwxr-xr-x 3 root root 4096 Feb 3 13:11 ./
drwx------ 16 root root 4096 Feb 3 13:00 ../
drwx------ 2 build build 4096 Feb 3 13:11 build/
Wenn ich nun versuche, nach dem chroot in das System zum Benutzer
build zu wechseln, bekomme ich folgende Meldung:
# su build
su: failed to execute /bin/bash: Permission denied
Als
root selbst kann ich jedoch
/bin/bash Problemlos ausführen.
# echo $SHELL
/bin/bash
# bash
# echo $SHELL
/bin/bash
# exit
exit
# echo $SHELL
/bin/bash
Also habe ich ein Rechteproblem vermutet. Es sieht aber alles okay aus.
# ls -ald /bin
lrwxrwxrwx 1 root root 7 Dec 5 23:43 /bin -> usr/bin
# ls -ald /usr
drwxr-xr-x 8 root root 4096 Feb 3 13:00 /usr
# ls -ald /usr/bin
drwxr-xr-x 5 root root 20480 Feb 3 13:13 /usr/bin
# ls -ald /usr/bin/bash
-rwxr-xr-x 1 root root 828320 Jan 21 21:03 /usr/bin/bash
# ls -ald /bin/bash
-rwxr-xr-x 1 root root 828320 Jan 21 21:03 /bin/bash
Mit einem frisch angelegten neuen Benutzer geht es aber auch nicht.
# useradd -mUs /usr/bin/bash test
# su test
su: failed to execute /usr/bin/bash: Permission denied
Was läuft hier falsch?