Changeset 765d4e3


Ignore:
Timestamp:
12/05/13 09:42:40 (18 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, enter/10, releng/10.0, releng/10.0.1, releng/10.0.2, releng/10.0.3, releng/10.1, releng/10.1.1, releng/10.1.2
Children:
e7f50cc
Parents:
00fef47
Message:

Fix some issues with the ldap scripts

Submitted by: Rodney Lewis <rodney@…>

Location:
src-sh/pc-adctl/scripts
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src-sh/pc-adctl/scripts/pc-nssldap

    r1620346 r765d4e3  
    110110        local usersuffix=$(ldap_get usersuffix) 
    111111        local groupsuffix=$(ldap_get groupsuffix) 
    112         local passwordsuffix=$(ldap_get passwordsuffix) 
     112        local passwordsuffix=$(ldap_get passwordstuff) 
    113113        local machinesuffix=$(ldap_get machinesuffix) 
    114114        local encryption_mode=$(ldap_get encryption_mode) 
     
    124124        tmp=$(mktemp /tmp/tmp.XXXXXX) 
    125125        ${cmd} \ 
    126                 -c -m "^host=${hostname}" \ 
     126                -c -m "^host=${host}" \ 
    127127                -c -m "^base=${basedn}" \ 
    128128                -c -m "^rootbinddn=${rootbasedn}" \ 
     
    265265                ln -sf ${secret} "$(dirname ${secret})/ldap.secret" 
    266266        fi 
     267 
     268        # Set the shadow options 
     269        cmd="${NSSLDAPCONF} -f ${conf}" 
     270 
     271        tmp=$(mktemp /tmp/tmp.XXXXXX) 
     272 
     273        if [ -z "${passwordsuffix}" ] 
     274        then 
     275                ${cmd} -c -m "^nss_base_shadow=${basedn}" -o "${tmp}" 
     276        else 
     277                ${cmd} -c -m "^nss_base_shadow=${passwordsuffix},${basedn}" -o "${tmp}" 
     278        fi 
     279        if [ "$?" != "0" ] 
     280        then 
     281                return 1 
     282        fi 
     283        if ! safe_save "${tmp}" "${conf}" 
     284        then 
     285                return 1 
     286        fi 
     287 
    267288} 
    268289 
  • src-sh/pc-adctl/scripts/pc-pam

    r1620346 r765d4e3  
    884884        elif checkyesno pc_ldap_enable 2>/dev/null 
    885885        then 
    886                 auth='-auth:sufficient:${pam_ldap}' 
    887                 account='-account:sufficient:${pam_ldap}' 
    888                 session='-session:required:${pam_mkhomedir}' 
    889                 password='-password:sufficient:${pam_ldap}' 
     886                auth="-auth:sufficient:${pam_ldap}" 
     887                account="-account:sufficient:${pam_ldap}" 
     888                session="-session:required:${pam_mkhomedir}" 
     889                password="-password:sufficient:${pam_ldap}" 
    890890 
    891891                do_pam_conf "${auth}" "${account}" "${session}" "${password}" 
Note: See TracChangeset for help on using the changeset viewer.