Запустил команду sh -x /usr/sbin/ldap-useradd test - отработало нормально (пользователь создан). Попробовал создать нового пользователя из веба - та же ошибка "CSPEKTR". Чудны дела :)
sudo sh -x /usr/sbin/ldap-useradd test
+ . alterator-kdc-princ-functions
++ . shell-error
+++ '[' -z '' ']'
+++ __included_shell_error=1
+++ PROG=ldap-useradd
+++ message_time=
+++ message_time_format=
+++ quiet=
+++ verbose=
+++ type -p kadmin.local
++ '[' -n /usr/sbin/kadmin.local ']'
+ . alterator-openldap-functions
++ '[' -z '' ']'
++ __included_alterator_openldap_functions=1
++ . shell-config
+++ '[' -z '' ']'
+++ __included_shell_config=1
+++ . shell-error
++++ '[' -z 1 ']'
+++ . shell-quote
++++ '[' -z '' ']'
++++ __included_shell_quote=1
++++ . shell-version
+++++ '[' -z '' ']'
+++++ __included_shell_version=1
+++++ libshell_version=3
+++++ __export_compatibility_string_quote_remove=1
++++ . shell-error
+++++ '[' -z 1 ']'
++++ . shell-string
+++++ '[' -z '' ']'
+++++ __included_shell_string=1
++++ '[' -n 1 ']'
+++ __shell_config_comment='#'
++ . shell-error
+++ '[' -z 1 ']'
++ . shell-quote
+++ '[' -z 1 ']'
++ . shell-signal
+++ '[' -z '' ']'
+++ __included_shell_signal=1
+++ . shell-error
++++ '[' -z 1 ']'
+++ . shell-quote
++++ '[' -z 1 ']'
+++ __shell_signal_handlers=
+++ __cleanup_handler_name=
++ rdelim='[[:space:]]\+'
++ wdelim=' '
++ SLAPD_CONF=/etc/openldap/slapd.conf
++ PAMLDAP_CONF=/etc/pam_ldap.conf
++ SYSCONFIG_CONF=/etc/sysconfig/ldap
++ SID=S-1-0-0
++ uid_min=5000
++ gid_min=5000
++ uid_max=9000
++ gid_max=9000
++ ENABLE_HOMEDIR=
++ ENABLE_SPOOL=
++ SPOOL=/var/spool/mail
+ set_ldap_config
+ '[' -z '' ']'
++ /usr/sbin/system-auth status
++ cut -f2 '-d '
+ base=dc=labara-rus
+ '[' -z dc=labara-rus ']'
++ ldap-dn find dc=labara-rus
+ export DN_CONF=/etc/openldap/slapd-labara-rus.conf
+ DN_CONF=/etc/openldap/slapd-labara-rus.conf
+ '[' -z /etc/openldap/slapd-labara-rus.conf ']'
++ shell_config_get /etc/sysconfig/system SERVER_ROLE
++ '[' 2 -ge 2 -a 2 -le 3 ']'
++ local file=/etc/sysconfig/system name=SERVER_ROLE delim==
++ '[' -s /etc/sysconfig/system ']'
++ quote_sed_regexp_variable name SERVER_ROLE
++ local __quote_set_regexp_variable_var __quote_set_regexp_variable_out
++ __quote_set_regexp_variable_var=name
++ shift
++ __quote_set_regexp_variable_out=SERVER_ROLE
++ '[' -z SERVER_ROLE ']'
++ eval 'name="$__quote_set_regexp_variable_out"'
+++ name=SERVER_ROLE
++ sed -n -e 's/^[[:space:]]*SERVER_ROLE=//p' -- /etc/sysconfig/system
+ '[' master = master ']'
+ export ENABLE_KRB=yes
+ ENABLE_KRB=yes
+ base_rootdn_rootpw
+ '[' -z /etc/openldap/slapd-labara-rus.conf ']'
+ '[' '!' -r /etc/openldap/slapd-labara-rus.conf ']'
++ read_dn_conf suffix
++ read_config /etc/openldap/slapd-labara-rus.conf suffix
++ '[' -e /etc/openldap/slapd-labara-rus.conf ']'
++ shell_config_get /etc/openldap/slapd-labara-rus.conf suffix '[[:space:]]\+'
++ tr -d '"'
++ '[' 3 -ge 2 -a 3 -le 3 ']'
++ local file=/etc/openldap/slapd-labara-rus.conf name=suffix 'delim=[[:space:]]\+'
++ '[' -s /etc/openldap/slapd-labara-rus.conf ']'
++ quote_sed_regexp_variable name suffix
++ local __quote_set_regexp_variable_var __quote_set_regexp_variable_out
++ __quote_set_regexp_variable_var=name
++ shift
++ __quote_set_regexp_variable_out=suffix
++ '[' -z suffix ']'
++ eval 'name="$__quote_set_regexp_variable_out"'
+++ name=suffix
++ sed -n -e 's/^[[:space:]]*suffix[[:space:]]\+//p' -- /etc/openldap/slapd-labara-rus.conf
+ base=dc=labara-rus
++ read_dn_conf rootdn
++ read_config /etc/openldap/slapd-labara-rus.conf rootdn
++ '[' -e /etc/openldap/slapd-labara-rus.conf ']'
++ shell_config_get /etc/openldap/slapd-labara-rus.conf rootdn '[[:space:]]\+'
++ tr -d '"'
++ '[' 3 -ge 2 -a 3 -le 3 ']'
++ local file=/etc/openldap/slapd-labara-rus.conf name=rootdn 'delim=[[:space:]]\+'
++ '[' -s /etc/openldap/slapd-labara-rus.conf ']'
++ quote_sed_regexp_variable name rootdn
++ local __quote_set_regexp_variable_var __quote_set_regexp_variable_out
++ __quote_set_regexp_variable_var=name
++ shift
++ __quote_set_regexp_variable_out=rootdn
++ '[' -z rootdn ']'
++ eval 'name="$__quote_set_regexp_variable_out"'
+++ name=rootdn
++ sed -n -e 's/^[[:space:]]*rootdn[[:space:]]\+//p' -- /etc/openldap/slapd-labara-rus.conf
+ rootdn=cn=ldaproot,dc=labara-rus
++ read_dn_conf rootpw
++ read_config /etc/openldap/slapd-labara-rus.conf rootpw
++ '[' -e /etc/openldap/slapd-labara-rus.conf ']'
++ shell_config_get /etc/openldap/slapd-labara-rus.conf rootpw '[[:space:]]\+'
++ tr -d '"'
++ '[' 3 -ge 2 -a 3 -le 3 ']'
++ local file=/etc/openldap/slapd-labara-rus.conf name=rootpw 'delim=[[:space:]]\+'
++ '[' -s /etc/openldap/slapd-labara-rus.conf ']'
++ quote_sed_regexp_variable name rootpw
++ local __quote_set_regexp_variable_var __quote_set_regexp_variable_out
++ __quote_set_regexp_variable_var=name
++ shift
++ __quote_set_regexp_variable_out=rootpw
++ '[' -z rootpw ']'
++ eval 'name="$__quote_set_regexp_variable_out"'
+++ name=rootpw
++ sed -n -e 's/^[[:space:]]*rootpw[[:space:]]\+//p' -- /etc/openldap/slapd-labara-rus.conf
+ rootpw=eiwohfo7eagie1uu
+ '[' -z dc=labara-rus ']'
+ '[' -z cn=ldaproot,dc=labara-rus ']'
+ '[' -z eiwohfo7eagie1uu ']'
+ rootpw='-w eiwohfo7eagie1uu'
+ export base rootdn rootpw
+ '[' -n /etc/openldap/slapd-labara-rus.conf ']'
+ '[' 1 -ne 0 ']'
+ first_name=
+ surname=
+ common_name=
+ is_workstation=no
+ is_trusted=no
+ home_dir=
+ shell=/bin/bash
+ passwd=
+ groups=
+ export OPTERR=1
+ OPTERR=1
+ getopts hwi-:n:f:c:d:s:p:G: c
+ shift 0
+ user=test
+ '[' -z '' ']'
+ surname=test
+ '[' -z '' ']'
+ common_name=test
+ '[' -z '' ']'
+ home_dir=/home/test
+ '[' no = yes -a no = yes -a t '!=' '$' ']'
+ '[' '' = 1 ']'
+ echo test
+ egrep '^[a-z][\.a-z0-9_-]*\$?$'
+ ldap-getent passwd test
++ ldap-getent passwd
++ cut -f3 -d:
++ sort -unr
++ head -1
++ ldap-getent ws
+ uid_avail=5001
+ uid=5002
+ '[' 5002 -le 9000 ']'
+ '[' 5002 -lt 5000 ']'
+ ldap-getent group test
+ ldap-groupadd test
++ ldap-getent group test
++ cut -f3 -d:
+ gid=5009
+ get_sid
++ net getlocalsid
++ cut -f2 -d:
++ sed -e 's/[[:blank:]]//g'
Can't fetch domain SID for name: SPEKTR
+ local sid=
+ '[' -n '' ']'
+ user_sid=S-1-0-0-11004
+ '[' no = yes ']'
+ '[' no '!=' yes ']'
+ '[' -n yes ']'
+ kdc_status=
+ service krb5kdc status
+ addprinc '+requires_preauth test'
+ '[' '' = fail ']'
++ cat
+ content='dn: uid=test,ou=People,dc=labara-rus
uid: test
cn: test
sn: test
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: sambaSamAccount
loginShell: /bin/bash
userPassword: {crypt}x
uidNumber: 5002
gidNumber: 5009
homeDirectory: /home/test
sambaAcctFlags: [U ]
sambaSID: S-1-0-0-11004
sambaPwdLastSet: 2147483647
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
sambaPwdMustChange: 0'
+ '[' -n '' ']'
+ '[' '' = 1 ']'
+ echo 'dn: uid=test,ou=People,dc=labara-rus
uid: test
cn: test
sn: test
objectClass: top
objectClass: person
objectClass: organizationalPerson
objectClass: inetOrgPerson
objectClass: posixAccount
objectClass: sambaSamAccount
loginShell: /bin/bash
userPassword: {crypt}x
uidNumber: 5002
gidNumber: 5009
homeDirectory: /home/test
sambaAcctFlags: [U ]
sambaSID: S-1-0-0-11004
sambaPwdLastSet: 2147483647
sambaLogonTime: 0
sambaLogoffTime: 2147483647
sambaKickoffTime: 2147483647
sambaPwdCanChange: 0
+ ldapadd -a -D cn=ldaproot,dc=labara-rus -w eiwohfo7eagie1uu -x -H ldap://127.0.0.1
sambaPwdMustChange: 0'
+ '[' no '!=' yes ']'
+ su - test -s /bin/true
+ touch /var/spool/mail/test
+ chmod 0660 /var/spool/mail/test
+ chown test:mail /var/spool/mail/test
+ '[' -n '' ']'
+ export IFS=,
+ IFS=,
Актуальную задачу создания пользователей я сейчас решу из командной строки. А на будущее хочется разобраться в проблеме.
Заодно хочу разобраться, что конкретно нужно написать в командной строке alterator-cmdline - так создание однотипных пользователей можно автоматизировать. Разберусь - напишу мануал (всё равно для своих ребят пишу инструкции).