LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   unknown item when re-installing shadow (https://www.linuxquestions.org/questions/linux-from-scratch-13/unknown-item-when-re-installing-shadow-915751/)

devilboy09 11-27-2011 03:53 AM

unknown item when re-installing shadow
 
i'm re-installing shadow after the installation of pam.i did everything as book says. after the configuration of chage and issuing the next command for creating the files like groupdel and useradd, i logged in as user ali and issued the su command, enter the password of the root user and i got this error:
Code:

configuration error- unknown item 'CRACKLIB_DICPATH' (notify administrator)
by the way i didn't install the cracklib

devilboy09 11-27-2011 08:49 AM

anybody ?

druuna 11-27-2011 02:48 PM

Hi,

It looks like you did use one of the commands in the Shadow-4.1.4.3 chapter that uses cracklib.

If you do not use cracklib do _not_ execute the following command:
Code:

sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs
and execute the 'system-passwd' (without cracklib) and _not_ the 'system-passwd' (with cracklib) command.

Hope this helps.

devilboy09 11-27-2011 03:12 PM

Code:

sed -i 's@DICTPATH.*@DICTPATH\t/lib/cracklib/pw_dict@' etc/login.defs
i didn't execute it.
Code:

execute the 'system-passwd'
i did execute it as well, but i'm getting the same error!!!

druuna 11-27-2011 03:18 PM

Hi,
Quote:

Originally Posted by devilboy09 (Post 4535516)
Code:

execute the 'system-passwd'
i did execute it as well, but i'm getting the same error!!!

?? You executed both the with and without version?

Remove /etc/pam.d/system-password and only re-run the 'system-passwd' (without cracklib) command.

Check all (!!) the created files manually to see if all went as described in the chapter.

devilboy09 11-27-2011 03:37 PM

Code:

You executed both the with and without version?
no, just without cracklib.
BTW there's a sed command in the re-installing shadow section for configuring /etc/login.defs:
Code:

for FUNCTION in LASTLOG_ENAB MAIL_CHECK_ENAB \
                PORTTIME_CHECKS_ENAB CONSOLE \
                MOTD_FILE NOLOGINS_FILE PASS_MIN_LEN \
                SU_WHEEL_ONLY MD5_CRYPT_ENAB \
                CONSOLE_GROUPS ENVIRON_FILE \
                ULIMIT ENV_TZ ENV_HZ ENV_SUPATH \
                ENV_PATH QMAIL_DIR MAIL_DIR MAIL_FILE \
                CHFN_AUTH FAILLOG_ENAB QUOTAS_ENAB FTMP_FILE \
                OBSCURE_CHECKS_ENAB CRACKLIB_DICTPATH \
                PASS_CHANGE_TRIES PASS_ALWAYS_WARN ISSUE_FILE
do
    sed -i "s/^$FUNCTION/# &/" /etc/login.defs
done

notice that there's a CRACKLIB_DICPATH option in for loop!!!
is it ok to use this option?

druuna 11-27-2011 03:47 PM

Hi,
Quote:

Originally Posted by devilboy09 (Post 4535534)
BTW there's a sed command in the re-installing shadow section for configuring /etc/login.defs:
Code:

for FUNCTION in LASTLOG_ENAB MAIL_CHECK_ENAB \
                PORTTIME_CHECKS_ENAB CONSOLE \
                MOTD_FILE NOLOGINS_FILE PASS_MIN_LEN \
                SU_WHEEL_ONLY MD5_CRYPT_ENAB \
                CONSOLE_GROUPS ENVIRON_FILE \
                ULIMIT ENV_TZ ENV_HZ ENV_SUPATH \
                ENV_PATH QMAIL_DIR MAIL_DIR MAIL_FILE \
                CHFN_AUTH FAILLOG_ENAB QUOTAS_ENAB FTMP_FILE \
                OBSCURE_CHECKS_ENAB CRACKLIB_DICTPATH \
                PASS_CHANGE_TRIES PASS_ALWAYS_WARN ISSUE_FILE
do
    sed -i "s/^$FUNCTION/# &/" /etc/login.defs
done

notice that there's a CRACKLIB_DICPATH option in for loop!!!
is it ok to use this option?

If you look at what the sed command does (comment out all in the for loop) you'll see that the command is correct (all the commands in the book are correct ;) ).

So it is not only OK to do this, you have to do this step.

Hope this helps.

devilboy09 11-29-2011 01:43 PM

i booted my host machine, chroot, and issued the commands, it went well


All times are GMT -5. The time now is 01:35 PM.