libgum comes with an command line utility gum-utility that demonstrates the most common use cases: creating users/groups, deleting users/groups, modifying users/groups, and querying users/groups
Before running the command-line utility, make sure that gum daemon and libgum are installed and configured correctly.
The source code for the utility is available at gum-utils
The full list of available gum-utils
options can be obtained with
gum-utils --help-all
User can be added with flag --add-user:
gum-utils --add-user <mandatory-args> <optional-args>:
mandatory-args are:
--username=<username> OR --nickname=<nickname>
--usertype=<usertype>
possible usertype can be system or admin or guest or normal.
optional-args are:
--usecret=<secret>
--realname=<realname>
--office=<office location>
--officephone=<ooffice phone>
--homephone=<home phone>
--homedir=<home dir>
--shell=<path to shell exe>
--write-nfc
--write-nfc flag can be used to write the username and secret to an NFC tag, if gum-utils was compiled with libtlm-nfc support.
User can be deleted with flag --delete-user:
gum-utils --delete-user <mandatory-args>:
mandatory-args are:
--uid=<uid>
User can be update with flag --update-user:
gum-utils --update-user <mandatory-args> <update-args>:
mandatory-args are:
--uid=<uid>
possible update-args are:
--usecret=<secret>
--realname=<realname>
--office=<office location>
--officephone=<office phone>
--homephone=<home phone>
--shell=<path to shell exe>
--write-nfc
--write-nfc flag has the same meaning as with adding users.
User data can be retrieved with flag --get-user:
gum-utils --get-user <mandatory-args>:
mandatory-args are:
--uid=<uid>
User data can be retrieved with flag --get-user-by-name:
gum-utils --get-user-by-name <mandatory-args>:
mandatory-args are:
--username=<username>
Group can be added with flag --add-group:
gum-utils --add-group <mandatory-args> <optional-args>:
mandatory-args are:
--groupname=<groupname>
--grouptype=<grouptype>
possible grouptypes are: system or user.
optional-args are:
--gsecret=<secret>
Group can be deleted with flag --delete-group:
gum-utils --delete-group <mandatory-args>:
mandatory-args are:
--gid=<gid>
Group can be updated with flag --udpate-group:
gum-utils --update-group <mandatory-args> <update-args>:
mandatory-args are:
--gid=<gid>
possible update-args are:
--gsecret=<secret>
Group data can be retrieved with flag --get-group:
gum-utils --get-group <mandatory-args>:
mandatory-args are:
--gid=<gid>
Group data can be retrieved with flag --get-group-by-name:
gum-utils --get-group-by-name <mandatory-args>:
mandatory-args are:
--groupname=<groupname>