libcrown
Version, currently 0.3.06 versions
github.com/j8r/libcrown
Library for Unix users, groups and passwords manipulation
7 stars
1 dependent
License: ISC
Installation
# Add this to your shard.yml
dependencies:
libcrown:
github: j8r/libcrown
version: ~> 0.3.0Then run:
shards installshard.yml
- Crystal
- no constraint declared
- License
- ISC
- Author
- Julien Reichardt
Dependencies
This version declares no dependencies.
README
Libcrown
Library for Unix users, groups and passwords manipulation.
Can be used to perform actions in Crystal usually done by commands like adduser, deluser.
Warning
By essence, manipulating system users, groups and passwords is sensitive. Be careful and be sure of what you do before any action.
This library is provided "as is", with no warranties, as stated in the ISC LICENSE.
Installation
Add the dependency to your shard.yml:
dependencies:
libcrown:
github: j8r/libcrown
Documentation
https://j8r.github.io/libcrown
Usage
To add a new user
require "libcrown"
# Root permissions are needed
libcrown = Libcrown.new
# Add a new group
libcrown.add_group Libcrown::Group.new("new_group"), 100_u32
# Add a new user with `new_group` as its main group
new_user = Libcrown::User.new(
name: "new_user",
gid: 100_u32,
full_name: "New Usser",
home_directory: "/home/new_user",
login_shell: "/bin/sh",
)
libcrown.add_user new_user
# Save the modifications to the disk
libcrown.write
License
Copyright (c) 2018-2019 Julien Reichardt - ISC License
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This release
- Version
0.3.0- Tagged
- Nov 10, 2019
- Commit
c54ca15847f4- Indexed
- yes
Dependents
Repository
github.com/j8r/libcrown
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 24, 2026
- Synced
- Sep 24, 2026
- Versions
- 6