View | Details | Raw Unified | Return to bug 25931
Collapse All | Expand All

(-)a/alterator-ldap-users/backend3/ldap-users (-8 / +13 lines)
Lines 280-286 read_ldap_photo(){ Link Here
280
280
281
user_read(){
281
user_read(){
282
    local name="$1";shift
282
    local name="$1";shift
283
    if [ -n "$mode" -a "$mode" == "ldap" ];then
283
    case "$mode" in
284
      ldap|krb5)
284
	ldap-getent passwd "$name" uid userPassword givenName sn cn o ou title telephoneNumber mobile homeDirectory loginShell uidNumber departmentNumber postalAddress|
285
	ldap-getent passwd "$name" uid userPassword givenName sn cn o ou title telephoneNumber mobile homeDirectory loginShell uidNumber departmentNumber postalAddress|
285
		(IFS=: read name userpassword givenname sn cn o ou title telephonenumber mobile homedirectory loginshell uidNumber departmentnumber postaladdress;
286
		(IFS=: read name userpassword givenname sn cn o ou title telephonenumber mobile homedirectory loginshell uidNumber departmentnumber postaladdress;
286
		patronym="$(echo ${cn#$sn})"
287
		patronym="$(echo ${cn#$sn})"
Lines 296-302 user_read(){ Link Here
296
			write_bool_param is_active false ||
297
			write_bool_param is_active false ||
297
			write_bool_param is_active true
298
			write_bool_param is_active true
298
		)
299
		)
299
    else
300
		;;
301
      *)
300
	getent passwd "$name" |
302
	getent passwd "$name" |
301
		(IFS=: read uid userpassword uidNumber gidNumber gecos homedirectory loginshell;
303
		(IFS=: read uid userpassword uidNumber gidNumber gecos homedirectory loginshell;
302
		for f in uid userpassword uidNumber gecos homedirectory loginshell; do
304
		for f in uid userpassword uidNumber gecos homedirectory loginshell; do
Lines 308-314 user_read(){ Link Here
308
		    done
310
		    done
309
		done
311
		done
310
		)
312
		)
311
    fi
313
		;;
314
    esac
312
}
315
}
313
316
314
ldap_user_add_default_groups(){
317
ldap_user_add_default_groups(){
Lines 405-411 read_userlist(){ Link Here
405
    [ -z "$in_maxuid" -o "$in_maxuid" == "#f" ] && in_maxuid="9000"
408
    [ -z "$in_maxuid" -o "$in_maxuid" == "#f" ] && in_maxuid="9000"
406
    [ "$in_maxuid" -gt "$in_minuid" ] || in_minuid="$in_maxuid"
409
    [ "$in_maxuid" -gt "$in_minuid" ] || in_minuid="$in_maxuid"
407
410
408
    if [ -n "$mode" -a "$mode" == "ldap" ];then
411
    case "$mode" in
412
      ldap|krb5)
409
	local IFS=$'\n'
413
	local IFS=$'\n'
410
	for i in $(ldap-getent passwd '*' uid uidNumber|sort) ;do
414
	for i in $(ldap-getent passwd '*' uid uidNumber|sort) ;do
411
        echo $i |
415
        echo $i |
Lines 415-421 read_userlist(){ Link Here
415
            fi
419
            fi
416
    	    done
420
    	    done
417
	done
421
	done
418
    else
422
	;;
423
      *)
419
	local IFS=$'\n'
424
	local IFS=$'\n'
420
	for i in $(getent passwd | sort);do
425
	for i in $(getent passwd | sort);do
421
        echo $i |
426
        echo $i |
Lines 425-431 read_userlist(){ Link Here
425
        	fi
430
        	fi
426
    	    done
431
    	    done
427
	done
432
	done
428
    fi
433
	;;
434
    esac
429
}
435
}
430
436
431
list_bases(){
437
list_bases(){
Lines 741-747 on_message(){ Link Here
741
			       local)
747
			       local)
742
			       	  userdel "$user" || return
748
			       	  userdel "$user" || return
743
			       ;;
749
			       ;;
744
			       ldap)
750
			       ldap|krb5)
745
			        user_delete "$user" || return
751
			        user_delete "$user" || return
746
			        ldap_user_del_default_groups "$user"
752
			        ldap_user_del_default_groups "$user"
747
				;;
753
				;;
748
- 

Return to bug 25931