I installed poppassd 1.8.10 on CentOS 8.
Last time I installed cmake 3.18.3. This was to install poppassd 1.8.10.
With cmake 3.11.4 from poppassd 1.8.9, the previous method failed to install with an error.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@centos8 poppassd-ceti]# cmake . -- The C compiler identification is GNU 8.3.1 -- The CXX compiler identification is GNU 8.3.1 -- Check for working C compiler: /usr/bin/cc -- Check for working C compiler: /usr/bin/cc -- works -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Detecting C compile features -- Detecting C compile features - done -- Check for working CXX compiler: /usr/bin/c++ -- Check for working CXX compiler: /usr/bin/c++ -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for strcasestr -- Looking for strcasestr - not found -- Looking for security/pam_misc.h -- Looking for security/pam_misc.h - found CMake Error at CMakeLists.txt:16 (install): install FILES given no DESTINATION! -- Configuring incomplete, errors occurred! See also "/root/poppassd-ceti/CMakeFiles/CMakeOutput.log". See also "/root/poppassd-ceti/CMakeFiles/CMakeError.log". |
environment
・CentOS Linux release 8.2.2004 (Core)
・Kernel 4.18.0-193.19.1.el8_2.x86_64
poppassd-ceti
https://github.com/kravietz/poppassd-ceti
- Install “Development Tools”
- install pam-devel
- git clone poppassd-ceti.git
- cmake
- make
- make install
- Check /etc/pam.d/poppassd
- install xinetd
- Create /etc/xinetd.d/poppassd
- Enable xinetd and start
- Operation check
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
[root@centos8 ~]# dnf -y groupinstall "Development Tools" [root@centos8 ~]# dnf grouplist Available Environment Groups: Server with GUI Server Workstation Virtualization Host Custom Operating System Installed Environment Groups: Minimal Install Installed Groups: Development Tools Security Tools System Tools Available Groups: Container Management .NET Core Development RPM Development Tools Graphical Administration Tools Headless Management Legacy UNIX Compatibility Network Servers Scientific Support Smart Card Support |
1 |
[root@centos8 ~]# dnf -y install pam-devel |
1 2 3 4 5 6 7 8 |
[root@centos8 ~]# git clone https://github.com/kravietz/poppassd-ceti.git Cloning into 'poppassd-ceti'... remote: Enumerating objects: 271, done. remote: Counting objects: 100% (271/271), done. remote: Compressing objects: 100% (172/172), done. remote: Total 436 (delta 143), reused 204 (delta 86), pack-reused 165 Receiving objects: 100% (436/436), 130.46 KiB | 371.00 KiB/s, done. Resolving deltas: 100% (232/232), done. |
Use the previously installed version of cmake 3.18.3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
[root@centos8 ~]# cd poppassd-ceti/ [root@centos8 poppassd-ceti]# /opt/cmake-3.18.3/bin/cmake . -- The C compiler identification is GNU 8.3.1 -- The CXX compiler identification is GNU 8.3.1 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Looking for strcasestr -- Looking for strcasestr - not found -- Looking for security/pam_misc.h -- Looking for security/pam_misc.h - found -- Configuring done -- Generating done -- Build files have been written to: /root/poppassd-ceti |
1 2 3 4 5 |
[root@centos8 poppassd-ceti]# make Scanning dependencies of target poppassd [ 50%] Building C object CMakeFiles/poppassd.dir/poppassd.c.o [100%] Linking C executable poppassd [100%] Built target poppassd |
1 2 3 4 5 6 7 8 9 |
[root@centos8 poppassd-ceti]# make install [100%] Built target poppassd Install the project... -- Install configuration: "" -- Installing: /usr/local/sbin/poppassd -- Installing: /etc/pam.d/poppassd -- Installing: /etc/systemd/system/poppassd.service -- Installing: /etc/systemd/system/poppassd.socket Created symlink /etc/systemd/system/sockets.target.wants/poppassd.socket -> /etc/systemd/system/poppassd.socket. |
1 2 3 4 5 6 |
[root@centos8 ~]# cat /etc/pam.d/poppassd #%PAM-1.0 auth required pam_unix.so account required pam_unix.so session required pam_unix.so password required pam_unix.so no_warn try_first_pass nullok |
The systemd service didn’t work due to an error, so I went with xinetd.
1 |
[root@centos8 ~]# dnf -y install xinetd |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
[root@centos8 ~]# vi /etc/xinetd.d/poppassd [root@centos8 ~]# cat /etc/xinetd.d/poppassd service poppassd { disable = no socket_type = stream wait = no user = root server = /usr/local/sbin/poppassd log_on_success += USERID log_on_failure += USERID only_from = 127.0.0.1 } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
[root@centos8 ~]# systemctl enable xinetd [root@centos8 ~]# systemctl start xinetd [root@centos8 ~]# systemctl status xinetd * xinetd.service - Xinetd A Powerful Replacement For Inetd Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2020-10-01 11:44:14 JST; 1h 46min ago Docs: man:xinetd man:xinetd.conf man:xinetd.log Main PID: 7892 (xinetd) Tasks: 1 (limit: 49602) Memory: 1.5M CGroup: /system.slice/xinetd.service `-7892 /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: removing discard Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: removing echo Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: removing echo Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: removing tcpmux Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: removing time Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: removing time Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: xinetd Version 2.3.15 started with loadavg labeled-networking options compiled in. Oct 01 11:44:14 centos8.rootlinks.net xinetd[7892]: Started working: 1 available service Oct 01 11:44:19 centos8.rootlinks.net xinetd[7892]: START: poppassd pid=7894 from=::ffff:127.0.0.1 Oct 01 11:44:31 centos8.rootlinks.net xinetd[7892]: EXIT: poppassd status=1 pid=7894 duration=12(sec) |
Create a guest user and check the operation of poppassd. And also check that the password has been changed by ssh.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
[root@centos8 ~]# useradd guest [root@centos8 ~]# passwd guest Changing password for user guest. New password: BAD PASSWORD: The password fails the dictionary check - it is based on a dictionary word Retype new password: passwd: all authentication tokens updated successfully. [root@centos8 ~]# telnet 127.0.0.1 106 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. 200 poppassd user guest 200 Your password please pass qaz1wsx2 200 Your new password please newpass edc3rfv4 200 Password changed quit 200 Bye Connection closed by foreign host. [root@centos8 ~]# ssh guest@127.0.0.1 guest@127.0.0.1's password: Activate the web console with: systemctl enable --now cockpit.socket Last login: Thu Oct 1 13:37:39 2020 from 192.168.1.1 |