一套管理pam_mysql用户的工具

PAMMySQLTools的Python项目详细描述


|build||coverage|

pam mysql工具是一个管理pam_mysql和 libnss mysql。它试图模仿linux工具的行为 用户{add,mod,del}和组{add,mod,del}

安装

要安装,只需运行:

pip install PAMMySQLTools

这将安装脚本:

  • myuseradd
  • myusermod
  • myuserdel
  • mygroupadd
  • mygroupmod
  • mygroupdel

配置

在目录docs中,您可以找到一个示例配置,其中包含 一切就绪。如果不设置值,工具将假定 原始配置中的值作为默认值。

运行软件

要显示任何脚本的帮助,请从–help参数开始

例如:

$ myuseradd --help
Usage: myuseradd [OPTIONS] LOGIN

Options:
  -b, --basedir BASE_DIR          base directory for the home directory of the
                                  new account
  -c, --comment COMMENT           GECOS field of the new account
  -d, --home-dir HOME_DIR         home directory of the new account
  -e, --expiredate EXPIRE_DATE    expiration date of the new account
  -f, --inactive INACTIVE         password inactivity period of the new
                                  account
  -g, --gid GROUP                 name or ID of the primary group of the new
                                  account
  -G, --groups GROUPS             list of supplementary groups of the new
                                  account
  -k, --skel SKEL_DIR             use this alternative skeleton directory
  -K, --key KEY=VALUE             override /etc/login.defs defaults
  -M, --no-create-home / -m, --create-home
                                  do not create the user's home directory
  -U, --no-user-group / -N, --user-group
                                  do not create a group with the same name as
                                  the user
  -o, --non-unique                allow to create users with duplicate (non-
                                  unique) UID
  -p, --password PASSWORD         encrypted password of the new account
  -r, --system                    create a system account
  -s, --shell SHELL               login shell of the new account
  -u, --uid UID                   user ID of the new account
  --config CONF_PATH              path to the config file for this tool
  --help                          Show this message and exit.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java GWT对话框从不显示帮助   java在简单的MapReduce作业中带来了极大的开销   javacom。mysql。jdbc。例外情况。jdbc4。MySQLIntegrityConstraintViolationException:列不能为null/onetoone映射   如何通过TCP/IP与Java和Labview进行通信,并发送浮点数据缓冲区?   java Apache camel与spring事件基本示例   java如何使我的秒表应用程序在完全关闭后仍能运行?   java Nutch爬网错误输入路径不存在   java是Mapreduce中按值传递还是按引用传递的键?   正则表达式替换java中的特定字符   Java DOM XML解析   java Eclipse未显示服务器的项目   使用Arraylist进行快速排序的排序Java实现疑难解答   java Split text包含字符串列表中的数字   检查Java中的两个lambda是否执行相同的代码?   java为什么dispatchTouchEvent避免在屏幕上单击?