I needed to customize useradd command so i downloaded shadow-utils source package. Using configure-make i was able to compile the source , binary was generated (configure prefix) at custom location (/home/user1/Download/shadow-utils/sbin).

now trying to use ./useradd john i get :

configuration error - unknown item 'PASS_MIN_LEN' (notify administrator)
useradd: PAM authentication failed

also ldd /home/user1/Download/shadow-utils/sbin/useradd

linux-vdso.so.1 =>  (0x00007fff2970d000)
>>  libpam.so.0 => /lib64/libpam.so.0 (0x00002add214e7000) 
>>  libpam_misc.so.0 => /lib64/libpam_misc.so.0 (0x00002add216f6000)
libaudit.so.1 => /lib64/libaudit.so.1 (0x00002add218fa000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00002add21b1d000)
libc.so.6 => /lib64/libc.so.6 (0x0000003273400000)
libdl.so.2 => /lib64/libdl.so.2 (0x0000003274000000)
>>  libcrypt.so.1 => /lib64/libcrypt.so.1 (0x000000327c400000)
/lib64/ld-linux-x86-64.so.2 (0x0000003273000000)
>>  libfreebl3.so => /lib64/libfreebl3.so (0x00002add21d3e000)

ldd /usr/sbin/useradd

linux-vdso.so.1 =>  (0x00007fffc6eda000)
libaudit.so.1 => /lib64/libaudit.so.1 (0x00002b478d16b000)
libselinux.so.1 => /lib64/libselinux.so.1 (0x00002b478d38f000)
libacl.so.1 => /lib64/libacl.so.1 (0x00002b478d5ae000)
libc.so.6 => /lib64/libc.so.6 (0x00002b478d7b6000)
libdl.so.2 => /lib64/libdl.so.2 (0x00002b478db4b000)
/lib64/ld-linux-x86-64.so.2 (0x0000003273000000)
libattr.so.1 => /lib64/libattr.so.1 (0x00002b478dd4f000)

clearly my version of useradd uses PAM library , freeb13 but does not use libacl, libattr . Though after commenting out PASS_MIN_LENGTH from /etc/login.defs , the configuration error is gone , but the authentication failed error still remains.

It seems that i need to build useradd without libpam , but is there a way out of present situation ? Hints / help would be highly appreciated.

  • 1
    Generally for making such modifications to standard programs it's best you download your distribution's source package for that program, make your modification, and then use the normal building procedure to build a package. That way you don't have such differences in how a package is configured. You can then install the result; just care take that upgrades don't replace your version (in Debian I'd put the package "on hold" usign aptitude).
    – wurtel
    Jan 22, 2015 at 11:19

1 Answer 1


while configuring , used flags : --without-libpam --without-sha-crypt . The useradd command was successfully creating users now.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .