p4 ldapsync
Synopsis
Synchronize Perforce group ememberships with LDAP groups.
Syntax
p4 [gopts
] ldapsync -g [-n]
[-i N
]
[group
…]
Description
The p4 ldapsync command updates the users in the specified Perforce groups to match the members in the corresponding LDAP groups. The correspondance between a Perforce group and an LDAP group is defined in the Perforce group spec. If you do not specify a group name, all groups with LDAP configurations are updated.
For information about using the Perforce group spec to associate an LDAP group with a Perforce group, see "Authorization using LDAP groups" in the Perforce Server Administrator's Guide: Fundamentals.
You can synchronize once or at a given interval. To enable periodic synchronization, you must add the p4 ldapsync command as a startup command as follows:
-
Check that the Perforce server has its server id set. Use the p4 serverid command to check.
-
If the server has no server id, assign one using a command like the following:
p4 serverid
my-server
-
Use the p4 configure show command to check which startup configurables are already being used. Select the next available number. For example, if six startup configurables are being used, you can set the startup configurable that runs the p4 ldapsync command as number 7:
p4 configure set "
my-server
#startup.7
=ldapsync -g -i1800
"This command will update all groups with valid LDAP synchronisation configurations every 1800 seconds (30 minutes).
Options
|
Required to specify groups. |
|
Execute the command every If this option is not specified, the command executes once and exits. |
|
Preview the operation and show the groups that would be affected without taking any action. |
|
The name of a Perforce group that must be updated when changes to the corresponding LDAP group take place. |
Usage Notes
Can File Arguments Use Revision Specifier? |
Can File Arguments Use Revision Range? |
Minimal Access Level Required |
---|---|---|
N/A |
N/A |
|
Examples
p4 ldapsync -g |
Updates all groups for which LDAP configurations have been defined. |