You can use sudoers2ldif which you can find in sudo tar package.
#export SUDOERS_BASE=ou=sudoers,dc=test,dc=com
#perl sudoers2ldif /etc/sudoers >sudo.ldif
#cat sudoou.ldif
dn: ou=sudoers,dc=test,dc=com
ou: sudoers
objectClass: top
objectClass: organizationalUnit
#ldapadd -c -x -D "cn=Manager,dc=test,dc=com" -W -f sudoou.ldif
#ldapadd -c -x -D "cn=Manager,dc=test,dc=com" -W -f sudo.ldif
阅读(1231) | 评论(0) | 转发(0) |