Skip to content

cybozu-go/etcdpasswd

Folders and files

NameName
Last commit message
Last commit date

Latest commit

b08deed · Mar 28, 2025
Mar 26, 2025
Jul 26, 2023
Jul 25, 2018
May 20, 2021
Nov 15, 2024
Dec 20, 2021
Mar 16, 2021
May 20, 2021
Mar 27, 2025
Sep 10, 2021
Nov 15, 2024
Sep 10, 2021
Sep 6, 2024
Dec 20, 2021
Dec 20, 2021
Nov 19, 2018
Jun 11, 2018
Jun 12, 2018
Jul 25, 2018
Dec 20, 2021
Jun 12, 2018
Jun 11, 2018
Aug 6, 2018
Mar 26, 2025
Mar 26, 2025
Dec 20, 2021
Dec 20, 2021
Jun 12, 2018
Dec 20, 2021
Mar 19, 2021
Jun 11, 2018
Dec 20, 2021
Dec 20, 2021
Jun 11, 2018
Mar 27, 2025

Repository files navigation

GitHub release Go Reference CI Go Report Card

etcdpasswd

etcdpasswd manages Linux users and groups with a central database on etcd. This repository provides following two programs:

  • ep-agent: a background service that watches etcd database and synchronize Linux users/groups.
  • etcdpasswd: CLI tool to edit the central database on etcd.

Build

$ go install github.com/cybozu-go/etcdpasswd/...

Installation

  1. Prepare an etcd cluster.

  2. Create /etc/etcdpasswd/config.yml.

    This file provides parameters to connect to the etcd cluster. A sample configuration looks like this:

    endpoints:
      - http://12.34.56.78:2379
    username: cybozu
    password: xxxxxxxx
    
    tls-cert-file: /etc/etcdpasswd/etcd.crt
    tls-key-file: /etc/etcdpasswd/etcd.key
  3. Run ep-agent.

    A sample systemd unit file is available at cmd/ep-agent/ep-agent.service. Use it to run ep-agent as a systemd service as follows:

    $ sudo cp $GOPATH/bin/ep-agent /usr/local/sbin
    $ sudo cp ep-agent.service /etc/systemd/system
    $ sudo systemctl daemon-reload
    $ sudo systemctl enable ep-agent.service
    $ sudo systemctl start ep-agent.service
  4. Use etcdpasswd to initialize the database.

    $ etcdpasswd set start-uid 2000
    $ etcdpasswd set start-gid 2000
    $ etcdpasswd set default-group cybozu
    $ etcdpasswd set default-groups sudo,adm

Usage

See pkg/etcdpasswd/USAGE.md.

Specifications

Read docs/spec.md.

License

etcdpasswd is licensed under the Apache License, Version 2.0.