usergroup

Usages :

passhport-admin usergroup list
passhport-admin usergroup search [<pattern>]
passhport-admin usergroup show [<name>]
passhport-admin usergroup create [(<name> [--comment=<comment>])]
passhport-admin usergroup edit [(<name> [--newname=<name>] [--newcomment=<comment>])]
passhport-admin usergroup (adduser | rmuser) [(<username> <usergroupname>)]
passhport-admin usergroup (addusergroup | rmusergroup) [(<subusergroupname> <usergroupname>)]
passhport-admin usergroup delete [([-f | --force] <name>)]

list

passhport-admin usergroup list show all the configured usergroups.

Example :

[email protected]:~$ passhport-admin usergroup list
admins
database-admins
external
network-admins
[email protected]:~$

show

passhport-admin usergroup show <NAME> shows informations about the usergroup <NAME>.

Example :

[email protected]:~$ passhport-admin usergroup show admins
Name: admins
Comment:
User list: [email protected] [email protected]
Usergroup list:
All users: [email protected] [email protected]
All usergroups:
[email protected]:~$

If no pattern is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup show
Name: admins
Name: admins
Comment:
User list: [email protected] [email protected]
Usergroup list:
All users: [email protected] [email protected]
All usergroups:
[email protected]:~$

create

passhport-admin usergroup create [(<name> [--comment=<comment>])] creates a new usergroup.

Argument Description
<name> Name of the usergroup to create
--comment Comment concerning the usergroup (optional)

Example :

[email protected]:~$ passhport-admin usergroup create external
OK: "external" -> created
[email protected]:~$

If no argument is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup delete database-admins
Name: database-admins
Comment:
User list:
Usergroup list:
All users:
All usergroups:
Are you sure you want to delete database-admins? [y/N] y
OK: "database-admins" -> deleted
[email protected]:~$

edit

passhport-admin usergroup edit [(<name> [--newname=<name>] [--newcomment=<comment>])] edits an existing usergroup.

Argument Description
<name> Name of the usergroup to edit
--newname New name of the usergroup if you want to rename it (optional)
--newcomment New comment concerning the usergroup (optional)

Example :

[email protected]:~$ passhport-admin usergroup edit admins --newname=linux-admins
OK: "admins" -> edited
[email protected]:~$

If no argument is given, user enters in interactive mode. It firsts shows all parameters of the usergroup, then displays each parameters for a change. User can keep any previous configured parameter, just by typing "Enter". They only exception is the comment. If user wants to remove the comment, he just type "Enter", and will then be asked if the original comment should be removed or not.

Example :

[email protected]:~$ passhport-admin usergroup edit
Name of the usergroup you want to modify: external
Name: external
Comment:
User list:
Usergroup list:
All users:
All usergroups:
New name: external-admins
New comment:
Remove original comment? [y/N]
OK: "external" -> edited
[email protected]:~$

As you can see above, we only changed the "New name" entry. If an entry is simply replied with "enter", it keeps the previous value.

adduser

passhport-admin usergroup adduser [(<username> <usergroupname>)] add a user in a usergroup.

Argument Description
<username> Name of the user to add in a usergroup
<usergroupname> Name of the usergroup in which to add the user

Example :

[email protected]:~$ passhport-admin usergroup adduser [email protected] network-admins
OK: "[email protected]" added to "network-admins"
[email protected]:~$

If no argument is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup adduser
Username: [email protected]
Usergroupname: external-admins
OK: "[email protected]" added to "external-admins"
[email protected]:~$

rmuser

passhport-admin usergroup rmuser [(<username> <usergroupname>)] removes a user from a usergroup.

Argument Description
<username> Name of the user to remove from a usergroup
<usergroupname> Name of the usergroup of which to remove the user

Example :

[email protected]:~$ passhport-admin usergroup rmuser [email protected] linux-admins
OK: "[email protected]" removed from "linux-admins"
[email protected]:~$

If no argument is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup rmuser
Username: [email protected]
Usergroupname: external-admins
OK: "[email protected]" removed from "external-admins"
[email protected]:~$

addusergroup

passhport-admin usergroup addusergroup [(<subusergroupname> <usergroupname>)] adds a usergroup in another usergroup.

Argument Description
<subusergroupname> Name of the usergroup to add in a usergroup
<usergroupname> Name of the usergroup in which to add the usergroup

Example :

[email protected]:~$ passhport-admin usergroup addusergroup linux-admins admins
OK: "linux-admins" added to "admins"
[email protected]:~$

If no argument is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup addusergroup
Subusergroupname: network-admins
Usergroupname: admins
OK: "network-admins" added to "admins"
[email protected]:~$

rmusergroup

passhport-admin usergroup rmusergroup [(<subusergroupname> <usergroupname>)] delete the connection between a usergroup and a usergroup.

Argument Description
<subusergroupname> Name of the usergroup to remove from a usergroup
<usergroupname> Name of the usergroup of which to remove the usergroup

Example :

[email protected]:~$ passhport-admin usergroup rmusergroup linux-admins admins
OK: "linux-admins" removed from "admins"
[email protected]:~$

If no argument is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup rmusergroup
Subsergroupname: network-admins
Usergroupname: admins
OK: "network-admins" removed from "admins"
[email protected]:~$

delete

passhport-admin usergroup delete [([-f | --force] <name>)] delete a usergroup.

Argument Description
<name> Name of the usergroup to delete
-f or --force If used, user won't be prompt for confirmation

Example :

[email protected]:~$ passhport-admin usergroup delete network-admins
Name: network-admins
Comment:
User list: [email protected]
Usergroup list:
All users: [email protected]
All usergroups:
Are you sure you want to delete network-admins? [y/N] y
OK: "network-admins" -> deleted
[email protected]:~$

If no argument is given, user enters in interactive mode.

Example :

[email protected]:~$ passhport-admin usergroup delete
Name: linux-admins
Name: linux-admins
Comment:
User list: [email protected]
Usergroup list:
All users: [email protected]
All usergroups:
Are you sure you want to delete linux-admins? [y/N] y
OK: "network-admins" -> deleted
[email protected]:~$