https://github.com/metalefty/rubygem-fradium
FreeRADIUS User Manager - FreeRADIus User Manager
https://github.com/metalefty/rubygem-fradium
freeradius
Last synced: 6 months ago
JSON representation
FreeRADIUS User Manager - FreeRADIus User Manager
- Host: GitHub
- URL: https://github.com/metalefty/rubygem-fradium
- Owner: metalefty
- License: mit
- Created: 2019-08-29T08:35:33.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-05-12T04:38:32.000Z (over 5 years ago)
- Last Synced: 2025-04-02T09:49:13.804Z (6 months ago)
- Topics: freeradius
- Language: Ruby
- Homepage:
- Size: 54.7 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Fradium - FreeRADIUS User Manager
Fradium comes from **F**ree**RADI**US **U**ser **M**anager. Quick and easy tool to manage user database of FreeRADIUS.
## License
This software is licensed under the MIT license.## Installation
$ gem install fradium
You need to install corresponding database adapter gems what you want to connect.
$ gem install mysql2
$ gem install pq
$ gem install sqlite## Usage
### Configuration
First of all, create a confiuration file called `.fradium.yaml` in your home directory and specify information needed to your RADIUS database. You can define multiple configuration sets called *profile*.
Supported databases are MySQL and MariaDB via `mysql2` adapter so far. It should be work with SQLite 3 or PostgreSQL but still experimental.
```
default: # default profile
adapter: mysql2
host: radius.mysql.example.com
username: root
password:
database: radiusstaging:
adapter: mysql2
host: radius.mysql.example.com
username: root
password:
database: radius_stagingsqlite: "sqlite:///path/to/sqlite_database.sqlite"
```Profiles can be chosen by `--profile` option. Specify like `--profile=targetprofile`. If not specified, profile named `default` will be refered by default. Parameters defined in this config file are passed to [Sequel#connect](https://www.rubydoc.info/github/evanfarrar/opensprints/Sequel.connect) method as-is.
### Further usage
It would be easy to use. Running `fradium` without any options will show the usage.
```
usage:
fradium [--profile=profile] subcommand ...subcommands as follows:
create # create new user with password
show # show password for username
showall # show all users
showvalid # show valid(not expired) users
showexpired # show expired users
showexpiry # show expiry inforrmation
expire # expire the user right now
unexpire # unexpire the user
setexpire # set expiry date (date must be parseable by Time#parse)
modify # generate new password for username
dbconsole # enter database console
```## Development
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/metalefty/rubygem-fradium.