smbldap-entry-tools: How to use


Introduction

CommandFunction
smbldap-entry-mvMove/Copy an entry
smbldap-attributeAdd/Modify/Delete an attribute value of some entry

smbldap-entry-mv

Usage

  -c    copy mode
  -u    user
  -h,?  show this help message

  example:
    smbldap-entry-mv "uid=user1,dc=example,dc=com" "uid=user1,ou=Users,dc=example,dc=com"
    smbldap-entry-mv "uid=user1" "uid=user1,ou=Users"

  example with -u option:
    smbldap-entry-mv -u user1 "uid=user1,ou=Users,dc=example,dc=com"
    smbldap-entry-mv -u user1 "uid=user1,ou=Users"

smbldap-attribute

Usage

  -d    delete mode
  -s    separate character
  -h,?  show this help message

  add attribute and value (support multiple values):
    smbldap-attribute "uid=user1,dc=example,dc=com" "attribute:value"
    smbldap-attribute "uid=user1" "attribute:value"
    smbldap-attribute user1 "attribute:value"
    smbldap-attribute -s "_" "uid=user1,dc=example,dc=com" "attribute_value"

  modify value:
    smbldap-attribute "uid=user1,dc=example,dc=com" "attribute:current:new"
    smbldap-attribute "uid=user1" "attribute:current:new"
    smbldap-attribute user1 "attribute:current:new"
    smbldap-attribute -s "/" user1 "attribute/current/new"

  delete value:
    smbldap-attribute -d "uid=user1,dc=example,dc=com" "attribute:value"
    smbldap-attribute -d "uid=user1" "attribute"
    smbldap-attribute -d user1 "attribute"

Example

Add description to cn=group1,ou=Groups,dc=example,dc=org

smbldap-attribute "cn=group1,ou=Groups" "description:example group1"

Add public key to uid=user1,ou=Users,dc=example,dc=org
But it is recommended to use smbldap-ssh-tools.

smbldap-attribute user1 "sshPublicKey:ssh-rsa AAAAB3...1"