Univention Bugzilla – Attachment 4372 Details for
Bug 27112
sambaRID direkt ändern
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
test-rid-computers.sh
test-rid-computers.sh (text/plain), 2.16 KB, created by
Stefan Gohmann
on 2012-05-14 08:05 CEST
(
hide
)
Description:
test-rid-computers.sh
Filename:
MIME Type:
Creator:
Stefan Gohmann
Created:
2012-05-14 08:05 CEST
Size:
2.16 KB
patch
obsolete
>#!/bin/bash -e > >eval "$(ucr shell)" > >_lowerletters="abcdefghijklmnopqrstuvwxyz" >_upperletters="ABCDEFGHIJKLMNOPQRSTUVWXYZ" >_ciphers="0123456789" > > >pkill -f /usr/share/univention-directory-manager-tools/univention-cli-server || true > >/etc/init.d/univention-s4-connector stop > >random_chars () { # [length [characters]] > local stringlength=${1:-$STRINGLENGTH} > local charset=${2:-${_lowerletters}} > local string= > while ((${#string} < $stringlength)) > do > local pos=$((RANDOM % ${#charset})) > string+=${charset:$pos:1} > done > echo -n "$string" >} >random_username () { # Generates a random lowercase character (a-z0-9) > random_chars 10 "${_lowerletters}${_ciphers}" >} > >for role in domaincontroller_master domaincontroller_backup domaincontroller_slave memberserver; do > udm settings/lock list | sed -ne 's|DN: ||p' | while read l; do udm settings/lock remove --dn $l; done || true > C1=$(random_username) > udm computers/$role create --position cn=computers,$ldap_base --set name=$C1 > rid=$(univention-ldapsearch cn=$C1 sambaSID | sed -ne 's|sambaSID: ||;s|.*-||p') > echo "RID: $rid" > udm computers/$role remove --dn "cn=$C1,cn=computers,$ldap_base" > > C2=$(random_username) > udm computers/$role create --position cn=computers,$ldap_base --set name=$C2 --set sambaRID=987981123 > echo "*************** 987981123" > univention-ldapsearch cn=$C2 sambaSID > rid=$(univention-ldapsearch cn=$C2 sambaSID | sed -ne 's|sambaSID: ||;s|.*-||p') > echo "RID: $rid" > if [ "$rid" != 987981123 ]; then > echo "E: wrong rid" > fi > > udm computers/$role remove --dn "cn=$C2,cn=computers,$ldap_base" > > C3=$(random_username) > udm computers/$role create --position cn=computers,$ldap_base --set name=$C3 > rid=$(univention-ldapsearch cn=$C3 sambaSID | sed -ne 's|sambaSID: ||;s|.*-||p') > echo "RID: $rid" > udm computers/$role modify --dn cn=$C3,cn=computers,$ldap_base --set sambaRID=987981124 > echo "*************** 987981124" > rid=$(univention-ldapsearch cn=$C3 sambaSID | sed -ne 's|sambaSID: ||;s|.*-||p') > echo "RID: $rid" > if [ "$rid" != 987981124 ]; then > echo "E: wrong rid" > fi > udm computers/$role remove --dn "cn=$C3,cn=computers,$ldap_base" >done > > >/etc/init.d/univention-s4-connector start
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 27112
:
4371
| 4372