Perforce Admin

Recently I had to do some light Perforce administrative management tasks, such as creating new users and setting up their privileges. If you like to create a new user just invoke the following Perforce command from the command line.

p4 user -f username

If you try to connect to Perforce with the new user you might get a warning message that reads something like: Access for user ‘username’ has not been enabled by ‘p4 protect’. You need to explicitly give the user permissions or add the new user to a group that has the corresponding permissions. To add a user to a group simply execute something like the following command as the Perforce administrator.

p4 group groupname

You would replace groupname with the correct name of your group. The above command will open your default Perforce editor, most likely Notepad, with the group description, you can simply add the new user in the users list. The user will inherit the permission from the group.

You could have also giving the user permissions by editing the Perforce protect file. To edit the p4 protect file simply execute the following command as the super user.

p4 protect

Technorati Tags: , , ,