smbldap-ssh-tools: How to use


Introduction

CommandFunction
smbldap-sshadd/modify/delete an attribute for ldapPublicKey entry (support user mode)
smbldap-migrate-usercert_to_sshmigrate from strongAuthenticationUser to ldapPublicKey entry

smbldap-ssh

Usage

# add public key (support multiple public keys)
  Usage: /usr/local/sbin/smbldap-ssh username publickey
    add key1: smbldap-ssh user1 "ssh-rsa AAAAB3...1"
    add key2: smbldap-ssh user1 "ssh-rsa AAAAB3...2"

# delete public key
  Usage: /usr/local/sbin/smbldap-ssh -d username [publickey]
    delete all: smbldap-ssh -d user1
    delete one: smbldap-ssh -d user1 "ssh-rsa AAAAB3...1"

# help
  -h,? show this help message

Add a public key

This command support managing multiple public keys.

# smbldap-ssh user1 "ssh-rsa AAAAB3...1"
$ smbldap-ssh user1 "ssh-rsa AAAAB3...2"

Delete all public keys

# smbldap-ssh -d user1
$ smbldap-ssh -d user1

Delete the specified public key

# smbldap-ssh -d user1 "ssh-rsa AAAAB3...1"
$ smbldap-ssh -d user1 "ssh-rsa AAAAB3...2"

smbldap-ssh

Usage

# migrate from strongAuthenticationUser to ldapPublicKey
    smbldap-migrate-usercert_to_ssh

# migrate from strongAuthenticationUser to ldapPublicKey with delete strongAuthenticationUser attributes
    smbldap-migrate-usercert_to_ssh -d

# help
  -h,? show this help message

Migration step

  1. Please take the backup of all the entries.
  2. Run smbldap-migrate-usercert_to_ssh.
    # smbldap-migrate-usercert_to_ssh
    
  3. Check user entry.
  4. Run smbldap-migrate-usercert_to_ssh with -d option.
    # smbldap-migrate-usercert_to_ssh -d
    
  5. Check user entry.