targetgroup

Usages :

passhport-admin targetgroup list
passhport-admin targetgroup search [<pattern>]
passhport-admin targetgroup show [<name>]
passhport-admin targetgroup create [(<name> [--comment=<comment>])]
passhport-admin targetgroup edit [(<name> [--newname=<name>] [--newcomment=<comment>])]
passhport-admin targetgroup (adduser | rmuser) [(<username> <targetgroupname>)]
passhport-admin targetgroup (addtarget | rmtarget) [(<targetname> <targetgroupname>)]
passhport-admin targetgroup (addusergroup | rmusergroup) [(<usergroupname> <targetgroupname>)]
passhport-admin targetgroup (addtargetgroup | rmtargetgroup) [(<subtargetgroupname> <targetgroupname>)]
passhport-admin targetgroup delete [([-f | --force] <name>)]

list

passhport-admin targetgroup list show all the configured targetgroups.

Example :

[email protected]:~$ passhport-admin targetgroup list
linux-servers
network-appliances
phone-appliance
[email protected]:~$

show

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

Example :

[email protected]:~$ passhport-admin targetgroup show linux-servers
Name: linux-servers
Comment:
User list:
Target list: linux-7892 linux-7239 linux-1398
Usergroup list:
Targetgroup list:
All users:
All targets: linux-1398 linux-7239 linux-7892
All usergroups:
All targetgroups:
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup show
Name: linux-servers
Name: linux-servers
Comment:
User list:
Target list: linux-7892 linux-7239 linux-1398
Usergroup list:
Targetgroup list:
All users:
All targets: linux-1398 linux-7239 linux-7892
All usergroups:
All targetgroups:
[email protected]:~$

create

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

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

Example :

[email protected]:~$ passhport-admin targetgroup create linux-servers
OK: "linux-servers" -> created
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup create
Name: phone-appliance
Comment: Phones and IPBX appliances group.
OK: "phone-appliance" -> created
[email protected]:~$

edit

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

Argument Description
<name> Name of the targetgroup to edit
--newname New name of the targetgroup (optional)
--newcomment New comment concerning the targetgroup (optional)

Example :

[email protected]:~$ passhport-admin targetgroup edit linux-servers --newcomment="Linux servers group."
OK: "linux-servers" -> edited
[email protected]:~$

If no argument is given, user enters in interactive mode. It firsts shows all parameters of the target, 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 targetgroup edit
Name of the targetgroup you want to modify: network-appliances
Name: network-appliances
Comment:
User list:
Target list:
Usergroup list:
Targetgroup list:
All users:
All targets:
All usergroups:
All targetgroups:
New name:
New comment: Network appliance group.
OK: "network-appliances" -> edited
[email protected]:~$

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

adduser

passhport-admin targetgroup adduser [(<username> <targetgroupname>)] connects a targetgroup directly to a user.

Argument Description
<username> Name of the user to connect to the targetgroup
<targetname> Name of the targetgroup on which to connect the user

Example :

[email protected]:~$ passhport-admin targetgroup adduser [email protected] linux-servers
OK: "[email protected]" added to "linux-servers"
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup adduser
Username: [email protected]
Targetgroupname: network-appliances
OK: "[email protected]" added to "network-appliances"
[email protected]:~$

rmuser

passhport-admin targetgroup rmuser [(<username> <targetgroupname>)] deletes the direct connection between a targetgroup and a user.

Argument Description
<username> Name of the user to disconnect to the targetgroup
<targetname> Name of the targetgroup of which to disconnect the user

Example :

[email protected]:~$ passhport-admin targetgroup rmuser [email protected] network-appliances
OK: "[email protected]" removed from "network-appliances"
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup rmuser
Username: [email protected]
Targetgroupname: linux-servers
OK: "[email protected]" removed from "linux-servers"
[email protected]:~$

addusergroup

passhport-admin targetgroup addusergroup [(<usergroupname> <targetgroupname>)] connects a targetgroup directly to a usergroup.

Argument Description
<usergroupname> Name of the usergroup to connect to a targetgroup
<targetname> Name of the targetgroup on which to connect the usergroup

Example :

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

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

Example :

[email protected]:~$ passhport-admin targetgroup addusergroup
Usergroupname: network-admins
Targetgroupname: network-appliances
OK: "network-admins" added to "network-appliances"
[email protected]:~$

rmusergroup

passhport-admin targetgroup delusergroup [(<usergroupname> <targetgroupname>)] delete the connection between a targetgroup and a usergroup.

Argument Description
<usergroupname> Name of the usergroup to disconnect to the targetgroup
<targetname> Name of the targetgroup of which to disconnect the usergroup

Example :

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

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

Example :

[email protected]:~$ passhport-admin targetgroup rmusergroup
Usergroupname: network-admins
Targetgroupname: network-appliances
OK: "network-admins" removed from "network-appliances"
[email protected]:~$

addtargetgroup

passhport-admin targetgroup addtargetgroup [(<subtargetgroupname> <targetgroupname>)] connects a subtargetgroup directly to a targetgroup.

Argument Description
<subtargetgroupname> Name of the subtargetgroup to connect to a targetgroup
<targetname> Name of the targetgroup with which to connect the subtargetgroup

Example :

[email protected]:~$ passhport-admin targetgroup addtargetgroup linux-servers all-servers
OK: "linux-servers" added to "all-servers"
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup addtargetgroup
Subtargetgroupname: network-appliances
Targetgroupname: all-servers
OK: "network-appliances" added to "all-servers"
[email protected]:~$

rmtargetgroup

passhport-admin targetgroup deltargetgroup [(<subtargetgroupname> <targetgroupname>)] delete the connection between a subtargetgroup and a targetgroup.

Argument Description
<subtargetgroupname> Name of the subtargetgroup to disconnect to a targetgroup
<targetname> Name of the targetgroup of which to disconnect the subtargetgroup

Example :

[email protected]:~$ passhport-admin targetgroup rmtargetgroup linux-servers all-servers
OK: "linux-servers" removed from "all-servers"
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup rmtargetgroup
Subtargetgroupname: network-appliances
Targetgroupname: all-servers
OK: "network-appliances" removed from "all-servers"
[email protected]:~$

delete

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

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

Example :

[email protected]:~$ passhport-admin targetgroup delete linux-servers
Name: linux-servers
Comment: Linux servers group.
User list:
Target list: linux-7892 linux-7239 linux-1398
Usergroup list:
Targetgroup list:
All users:
All targets: linux-1398 linux-7239 linux-7892
All usergroups:
All targetgroups:
Are you sure you want to delete linux-servers? [y/N] y
OK: "linux-servers" -> deleted
[email protected]:~$

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

Example :

[email protected]:~$ passhport-admin targetgroup delete
Name: network-appliances
Name: network-appliances
Comment: Network appliance group.
User list:
Target list:
Usergroup list:
Targetgroup list:
All users:
All targets:
All usergroups:
All targetgroups:
Are you sure you want to delete network-appliances? [y/N] y
OK: "linux-servers" -> deleted
[email protected]:~$