Skip to content

mudler/entities

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
cmd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

πŸ” Entities

Modern go identity manager for UNIX systems.

Entities parses includes file to generate UNIX-compliant /etc/passwd , /etc/shadow and /etc/groups files. It can be used to handle identities management and honors already existing entities in the system.


$> entities apply <entity.yaml>
$> entities delete <entity.yaml>
$> entities create <entity.yaml>

Entities file format

Passwd

kind: "user"
username: "foo"
password: "pass"
uid: 0
gid: 0
info: "Foo!"
homedir: "/home/foo"
shell: "/bin/bash"

To use dynamic uid allocation set the uid field with value -1:

kind: "user"
username: "foo"
password: "pass"
uid: -1
gid: 500
info: "Foo!"
homedir: "/home/foo"
shell: "/bin/bash"

entities will searching for the first available range specified by the env variable ENTITY_DYNAMIC_RANGE or by the default the range 500-999.

To set gid with a dynamic id based by the group name you can set the group attribute:

kind: "user"
username: "foo"
password: "pass"
uid: 100
group: "foogroup"
info: "Foo!"
homedir: "/home/foo"
shell: "/bin/bash"

entities will retrieve the gid from existing /etc/group file.

Gshadow

kind: "gshadow"
name: "postmaster"
password: "foo"
administrators: "barred"
members: "baz"

Shadow

kind: "shadow"
username: "foo"
password: "bar"
last_changed: 1
minimum_changed: 2
maximum_changed: 3
warn: 4
inactive: 5
expire: 6

To define last_changed with a value equal to current days from 1970 use now.

Group

kind: "group"
group_name: "sddm"
password: "xx"
gid: 1
users: "one,two,tree"

To assign a dynamic gid it's possible to use the value -1:

kind: "group"
group_name: "foogroup"
password: "xx"
gid: -1
users: "one,two,tree"

entities will searching for the first available range specified by the env variable ENTITY_DYNAMIC_RANGE or by the default the range 500-999.

About

πŸ” Declarative modern identity manager for UNIX systems in Go

Resources

License

Stars

Watchers

Forks

Packages

No packages published