Skip to content

XiongGG1989/my-go-ldap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

配置文件

确保在编译后的执行文件目录中有 config.json 文件, 示例内容如下:

{
  "ldapBaseDN": "dc=example,dc=com",
  "adminDN": "cn=admin,dc=example,dc=com",
  "adminPass": "adminpassword",
  "ldapURL": "ldap://localhost:389",
  "userOU": "ou=people",
  "groupOU": "ou=groups",
  "DomainMail": "example.com"
}

编译为可执行文件

adduser 示例,进入到 adduser 目录:

Linux
GOOS=linux GOARCH=amd64 go build -o adduser

Win
GOOS=windows GOARCH=amd64 go build -o adduser.exe

Mac
GOOS=darwin GOARCH=amd64 go build -o adduser

功能

ADD

  • 添加用户

DELETE

  • 删除用户

MODIFY

  • 添加用户属性,可以同时增加一个或者多个值
  • 修改用户密码
  • 添加用户到指定组,可以同时加入多个组
  • 从指定组中移除用户

SEARCH

  • 搜索用户
  • 搜索组
  • 搜索指定组中所有成员

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages