diff options
Diffstat (limited to 'examples/LDAP/get_next_oid')
-rwxr-xr-x | examples/LDAP/get_next_oid | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/LDAP/get_next_oid b/examples/LDAP/get_next_oid new file mode 100755 index 0000000..bc3d6fc --- /dev/null +++ b/examples/LDAP/get_next_oid @@ -0,0 +1,15 @@ +#!/bin/bash + +nextattrib=$(cat samba.schema | grep -i attributetype.*\(.*1.3.6.1.4.1.7165. | grep -v '^#' | + awk '{print $3}' | cut -d. -f 10 | sort -n | tail -1) + +netattrib=$((netattrib + 1)) + +echo "attributetype ( 1.3.6.1.4.1.7165.2.1.$nextattrib NAME ...." + +nextoc=$(cat samba.schema | grep -i objectclass.*\(.*1.3.6.1.4.1.7165. | grep -v '^#' | + awk '{print $3}' | cut -d. -f 10 | sort -n | tail -1) + +nextoc=$((nextoc + 1)) + +echo "objectclass ( 1.3.6.1.4.1.7165.2.2.$nextoc NAME ...." |