Giter Club home page Giter Club logo

pg_user's Introduction

pg_user

Release GoDoc Quality Test

Is a cli application for managing postgres users.

Features

  • Creating new users with roles
  • Deleting existing users
  • Extending the validity of existing users
  • Resetting passwords (random or specific) of existing users
  • Listing existing users and their associated roles
  • Listing all configured hosts
  • Listing existing roles

Installation

Linux amd64

# install
curl -L https://github.com/frederikhs/pg_user/releases/latest/download/pg_user_Linux_x86_64.tar.gz -o pg_user.tar.gz
tar -xvf pg_user.tar.gz
sudo chmod +x pg_user
sudo mv pg_user /usr/local/bin/pg_user

# clean up
rm pg_user.tar.gz

Other

Other distributions or OS visit the releases page

Configuration

pg_user uses the format and location of the .pgpass file the resides in the $HOME directory of the user running the program.


Example of a host details in the .pgpass format

<HOST>:<PORT>:<DATABASE>:<USERNAME>:<PASSWORD>

Examples of usage

$ pg_user add [email protected] --host mydatabase.com

This requires the hostname mydatabase.com must be configured in the .pgpass file

To also add roles to the user when creating use

$ pg_user add [email protected] --host mydatabase.com --roles role1,role2

Development

This repository is very plain and simple and development of the application only required go.

$ go run main.go hosts will compile the application and list all configured hosts in your .pgpass file.

Release

release a new version by creating a tag and pushing it, then goreleaser will do the rest

git tag -a v0.x.0 -m "v0.x.0"
git push origin v0.x.0

pg_user's People

Contributors

frederikhs avatar madser123 avatar

Stargazers

hrckov avatar  avatar

Watchers

 avatar

Forkers

madser123

pg_user's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.