libcrown
Version, currently 0.2.26 versions
github.com/j8r/libcrown
Library for Unix users, groups and passwords manipulation
Nothing has been indexed for 0.2.2 yet. The tag is recorded, its shard.yml has not been read, so the manifest and dependency list below are empty because they are unknown rather than because they are absent.
Installation
# Add this to your shard.yml
dependencies:
libcrown:
github: j8r/libcrown
version: ~> 0.2.2Then run:
shards installshard.yml
No shard.yml has been indexed for 0.2.2. You can read it on the repository.
Dependencies
Unknown: the shard.yml for this version has not been read yet.
README
This README is the one indexed from the repository at its latest ref, not from the tag for this version.
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.2.2- Tagged
- Nov 10, 2019
- Commit
93b2ff1323e1- Indexed
- not yet
Dependents
Repository
github.com/j8r/libcrown
Metadata
- Created
- Aug 12, 2026
- Updated
- Sep 24, 2026
- Synced
- Sep 24, 2026
- Versions
- 6