Introduction

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

Add User

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.

Delete User

User can be deleted with flag --delete-user:


            
                gum-utils --delete-user <mandatory-args>:
                    mandatory-args are:
                        --uid=<uid> 
            

        

Update User

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.

Get User

User data can be retrieved with flag --get-user:


            
                gum-utils --get-user <mandatory-args>:
                    mandatory-args are:
                        --uid=<uid> 
            

        

Get User By Name

User data can be retrieved with flag --get-user-by-name:


            
                gum-utils --get-user-by-name <mandatory-args>:
                    mandatory-args are:
                        --username=<username> 
            

        

Add Group

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>
            

        

Delete Group

Group can be deleted with flag --delete-group:


            
                gum-utils --delete-group <mandatory-args>:
                    mandatory-args are:
                        --gid=<gid>
            

        

Update Group

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>
            

        

Get Group

Group data can be retrieved with flag --get-group:


            
                gum-utils --get-group <mandatory-args>:
                    mandatory-args are:
                        --gid=<gid> 
            

        

Get Group By Name

Group data can be retrieved with flag --get-group-by-name:


            
                gum-utils --get-group-by-name <mandatory-args>:
                    mandatory-args are:
                        --groupname=<groupname> 
            

        

Add member To Group

New member can be added to a group with flag --add-member:


            
                gum-utils --add-member <mandatory-args>:
                    mandatory-args are:
                        --gid=<gid> 
                        --mem_uid=<mem_uid> 
            

        

Delete member From Group

A member can be removed from the group with flag --delete-member:


            
                gum-utils --delete-member <mandatory-args>:
                    mandatory-args are:
                        --gid=<gid> 
                        --mem_uid=<mem_uid>