LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-27-2020, 08:45 PM   #1
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Error creating lxc container on -current


I get this error when trying to create a Slackware64-current container:

Code:
chpasswd: error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory
Error creating container Slackware64-current
Adding pam to the minimal list of packages in /usr/share/lxc/templates/lxc-slackware fixes that problem. However, now I get this error:

Code:
chpasswd: (user root) pam_chauthtok() failed, error:
Module is unknown
chpasswd: (line 1, user root) password not changed
Error creating container Slackware64-current
As a guess, I tried adding krb5 and pam-krb5 (separately) to the list, but that didn't help. Anyone know which packages are needed for chpasswd to work correctly?
 
Old 06-27-2020, 09:33 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,156

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
You need to add libpwquality
 
1 members found this post helpful.
Old 06-28-2020, 06:08 AM   #3
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
I still get the same error with libpwquality.
 
1 members found this post helpful.
Old 06-28-2020, 04:17 PM   #4
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,156

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Did you add cracklib too?
 
2 members found this post helpful.
Old 06-29-2020, 07:36 AM   #5
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Making progress. After adding libpwquality and cracklib I get this:

Code:
chpasswd: (user root) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user root) password not changed
Error creating container Slackware64-current
 
Old 06-29-2020, 07:44 AM   #6
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by montagdude View Post
Making progress. After adding libpwquality and cracklib I get this:

Code:
chpasswd: (user root) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user root) password not changed
Error creating container Slackware64-current
I'm having similar issues. I installed cracklib and libpwquality as suggested however, I'm not getting as far the error you have, I'm still getling the libpam error:

Code:
lxc-create -n test -t slackware --bdev dir

....

Configuring...

Adding an etc/fstab that must be modified later with the
full path of the container's rootfs if you decide to move it.
chpasswd: error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory
Error creating container test
I also note that --bdev btrfs seems not to work either, with different errors. No idea if that is related.
 
Old 06-29-2020, 08:06 AM   #7
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,156

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
According to https://www.codevoila.com/post/26/fi...word-in-ubuntu, it's related to permission of /etc/shadow
 
1 members found this post helpful.
Old 06-29-2020, 08:30 AM   #8
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Quote:
Originally Posted by petejc View Post
I'm having similar issues. I installed cracklib and libpwquality as suggested however, I'm not getting as far the error you have, I'm still getling the libpam error:

Code:
lxc-create -n test -t slackware --bdev dir

....

Configuring...

Adding an etc/fstab that must be modified later with the
full path of the container's rootfs if you decide to move it.
chpasswd: error while loading shared libraries: libpam.so.0: cannot open shared object file: No such file or directory
Error creating container test
I also note that --bdev btrfs seems not to work either, with different errors. No idea if that is related.
That was the error I got before adding pam. Did you do that?
 
1 members found this post helpful.
Old 06-29-2020, 09:31 AM   #9
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by montagdude View Post
That was the error I got before adding pam. Did you do that?
OK. Should have read the first post more carefully. I installed cracklib and libpwquality on the host system (but I assume they should already have been there) and I missed the bit about pam.

So I updated the template to add pam, cracklib and libpwquality, and I get the same, I thnk, as the other poster.

Code:
Configuring...

Adding an etc/fstab that must be modified later with the
full path of the container's rootfs if you decide to move it.
chpasswd: (user root) pam_chauthtok() failed, error:
Authentication token manipulation error
chpasswd: (line 1, user root) password not changed
Error creating container test
 
Old 06-29-2020, 11:17 AM   #10
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,156

Rep: Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379Reputation: 1379
Have you checked the /etc/shadow permission?
 
Old 06-29-2020, 11:29 AM   #11
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Quote:
Originally Posted by willysr View Post
Have you checked the /etc/shadow permission?
I tried adding chmod 640 $rootfs/etc/shadow in the slackware lxc template, but it didn't help.
 
Old 06-29-2020, 01:05 PM   #12
petejc
Member
 
Registered: Apr 2019
Distribution: Slackware
Posts: 72

Rep: Reputation: Disabled
Quote:
Originally Posted by montagdude View Post
I tried adding chmod 640 $rootfs/etc/shadow in the slackware lxc template, but it didn't help.
My setup already has these same permissions:

Code:
root@phoenix:/var/cache/lxc/slackware/rootfs-current-x86_64/etc# ls -al shadow
-rw-r----- 1 root shadow 704 May 15 04:07 shadow
Does not move us forward except that two people are having the same issue on different systems.
 
Old 06-29-2020, 02:16 PM   #13
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Well, I've got a workaround. With the following changes to /usr/share/lxc/templates/lxc-slackware, I can get a working container. Basically, I add the a, ap, d, k, l, and n groups to the installer. It's no longer minimal, though, but that's okay for me because I wanted a full install anyway. But I think this confirms that the problem is missing packages in addition to the ones that have already been identified (rather than a configuration issue like permissions), but I don't know which ones.

Code:
--- lxc-slackware	2020-01-02 15:21:06.000000000 -0500
+++ lxc-slackware.new	2020-06-29 15:08:09.821555944 -0400
@@ -95,8 +95,8 @@
 for clear_device in ${DEV}/null ${DEV}/zero ${DEV}/random ${DEV}/urandom \
   ${DEV}/tty ${DEV}/console ${DEV}/tty0 ${DEV}/tty1 ${DEV}/tty2 ${DEV}/tty3 \
   ${DEV}/tty4 ${DEV}/tty5 ${DEV}/full ${DEV}/initctl ${DEV}/loop0 \
-  ${DEV}/loop1 ; do
-  rm -f $clear_device
+  ${DEV}/loop1 ${DEV}/pts ${DEV}/shm ${DEV}/ptmx ${DEV}/fd; do
+  rm -rf $clear_device
 done
 # Create initial set of devices:
 mknod -m 666 ${DEV}/null c 1 3
@@ -237,6 +237,7 @@
 bin
 bzip2
 coreutils
+cracklib
 cyrus-sasl
 db48
 dcron
@@ -261,6 +262,7 @@
 libcap-ng
 libffi
 libmnl
+libpwquality
 libtasn1
 libunistring
 logrotate
@@ -272,6 +274,7 @@
 openssh
 openssl-solibs
 p11-kit
+pam
 pkgtools
 procps-ng
 sed
@@ -304,6 +307,7 @@
 
 slackpkg -default_answer=n update 
 slackpkg install-template $TEMPLATE
+slackpkg install a ap d k l n
 
 # add a slackpkg default mirror
 echo "$MIRROR/$PKGMAIN-$release/" >> $ROOT/etc/slackpkg/mirrors
 
Old 06-29-2020, 02:27 PM   #14
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 5,481

Rep: Reputation: Disabled
I just tested it and I spotted an issue with pam_securetty (as we seem to login from pts/0 using lxc-console): you can check if this is solves your issue editing /etc/securetty in the container (allowing login from pts)
Code:
sed -i "s|^#pts|pts|" $ROOT/etc/securetty
you should also have related errors in /var/log/secure if this is the case...

regarding the packages template for the container this is the new one I used here
Code:
aaa_base
aaa_elflibs
aaa_terminfo
bash
bin
bzip2
cracklib
coreutils
cyrus-sasl
db48
dcron
dhcpcd
dialog
diffutils
e2fsprogs
elfutils
elvis
etc
eudev
findutils
gawk
glibc-solibs
gnupg
gnutls
grep
gzip
iproute2
iputils
kmod
libcap-ng
libffi
libmnl
libpsl
libpwquality
libtasn1
libtirpc
libunistring
logrotate
mpfr
net-tools
nettle
network-scripts
ncurses
openssh
openssl-solibs
pam
pcre2
p11-kit
pkgtools
procps-ng
sed
shadow
sharutils
slackpkg
sysklogd
sysvinit
sysvinit-functions
sysvinit-scripts
tar
util-linux
wget
which
xz
it can be in your case that just libtirpc is needed.

BTW, here you can find a new version of the build script with the new template and the new init scripts (synced with the ones from Slackware current as today)

http://ponce.cc/slackware/testing/lxc/

Last edited by ponce; 06-29-2020 at 04:22 PM.
 
2 members found this post helpful.
Old 06-29-2020, 03:14 PM   #15
montagdude
Senior Member
 
Registered: Apr 2016
Distribution: Slackware
Posts: 1,761

Original Poster
Rep: Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339Reputation: 1339
Quote:
Originally Posted by ponce View Post
I just tested it and I spotted an issue with pam_securetty (as we seem to login from pts/0): you can check if this is solves your issue editing /etc/securetty in the container (allowing login from pts)
Code:
sed -i "s|^#pts|pts|" $ROOT/etc/securetty
you should also have related errors in /var/log/secure if this is the case...

regarding the packages template for the container this is the new one I used here
<snip>
it can be in your case that just libtirpc is needed.

BTW, here you can find a new version of the build script with the new template and the new init scripts (synced with the ones from Slackware current as today)

http://ponce.cc/slackware/testing/lxc/
That worked. I didn't need to make any changes to pam_securetty in order to get it installed and apparently working. So to summarize, the following 4 packages need to be added to the list:
  • cracklib
  • libpwquality
  • libtirpc
  • pam
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] new rc.* scripts added to -current in LXC container linuxtinker Slackware 1 06-16-2018 10:24 AM
[SOLVED] "lxc list" vs "lxc-ls" yknivag Linux - Virtualization and Cloud 1 03-09-2017 05:53 AM
Creating a CentoS 7 LXC container in an EC2 instance PeterSteele Linux - Virtualization and Cloud 2 08-12-2015 08:25 AM
script to get a lxc-container like iso of current. cod_liver_0il Slackware 1 09-10-2012 11:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration