{"id":4565,"date":"2018-01-09T06:07:44","date_gmt":"2018-01-09T06:07:44","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=4565"},"modified":"2025-02-01T22:39:33","modified_gmt":"2025-02-01T22:39:33","slug":"basic-perforce-administration-2","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/basic-perforce-administration-2\/","title":{"rendered":"Basic Perforce Administration"},"content":{"rendered":"<h3>A. User maintenance tasks<\/h3>\n<p>1. Resetting passwords<br \/>\n2. Creating users \/ Deleting users \/ Setting user access<br \/>\n3. Disabling the automatic creation of users<br \/>\n4. Cleaning up files left open by former users<\/p>\n<h3>B. Administrative operations<\/h3>\n<p>1. Setting the server security level<br \/>\n2. Obliterating files to reclaim disk space<br \/>\n3. Editing submitted changelists<br \/>\n4. Verifying server integrity<br \/>\n5. Defining files types to control Perforce&#8217;s file type detection mechanism<br \/>\n6. Use of the -f flag to force operation<\/p>\n<p><strong>In perforce, There are 2 Types of authentication menthods.<\/strong><br \/>\n1. passwords<br \/>\n2. tickets<\/p>\n<p><strong>Login to Perforce<\/strong><br \/>\n&gt; p4 login<\/p>\n<p><strong>Logout to the perforce<\/strong><br \/>\n&gt; p4 logout<\/p>\n<p><strong>Server security levels<\/strong><\/p>\n<p>Perforce superusers can configure server-wide password usage requirements, password strength enforcement, and supported methods of user\/server authentication by setting<br \/>\nthe security counter. To change the security counter, issue the command:<\/p>\n<p>&gt; p4 counter -f security seclevel<\/p>\n<p>where seclevel is 0, 1, 2, or 3. After setting the counter, stop and restart the server.<\/p>\n<ul>\n<li>The default security level is 0: passwords are not required, and password strength is not enforced.<\/li>\n<li>To ensure that all users have passwords, use security level 1. Users of old client programs may still enter weak passwords.<\/li>\n<li>To ensure that all users have strong passwords, use security level 2.<\/li>\n<li>To require that all users have strong passwords, and to require the use of session-based authentication, use security level 3 and current Perforce client software.<\/li>\n<\/ul>\n<p><strong>Resetting user passwords<\/strong><\/p>\n<p>&gt; p4 passwd username<\/p>\n<p><strong>Creating users<\/strong><\/p>\n<p>&gt; p4 user -f username<\/p>\n<p><strong>Preventing creation of users<\/strong><\/p>\n<p>1. Create a New p4 group or existing groups<br \/>\n&gt; p4 group p4users<br \/>\n2. Set P4 access to that Groups using<br \/>\n&gt; p4 protect<br \/>\nand add following..<br \/>\nwrite group p4users * \/\/&#8230;<\/p>\n<p><strong>Deleting obsolete users<\/strong><br \/>\n&gt; p4 user -d -f username<\/p>\n<p><strong>Reverting files left open by obsolete users<\/strong><\/p>\n<p>For example, if the output of p4 opened shows:<br \/>\n\/\/depot\/main\/code\/file.c#8 &#8211; edit default change (txt) by jim@stlouis<br \/>\nyou can delete the &#8220;stlouis&#8221; client workspace specification with:<br \/>\n&gt; p4 client -d -f stlouis<br \/>\nDeleting a client workspace specification automatically reverts all files opened in that workspace, and also removes that workspace\u2019s \u201chave list\u201d.<\/p>\n<p><strong>Running from inetd on UNIX<\/strong><\/p>\n<p>To have p4d start up only when connections are<br \/>\nmade to it, using inetd and p4d -i, add the following line to \/etc\/inetd.conf:<\/p>\n<p>&gt; p4dservice stream tcp nowait username \/usr\/local\/bin\/p4d p4d -i -rp4droot<\/p>\n<p>and add the following to \/etc\/services:<\/p>\n<p>&gt; p4dservice nnnn\/tcp<\/p>\n<p><strong>where:<\/strong><br \/>\n&#8211;&gt; p4dservice is the service name you choose for this Perforce server<br \/>\n&#8211;&gt; \/usr\/local\/bin is the directory holding your p4d binary<br \/>\n&#8211;&gt; p4droot is the root directory (P4DROOT) to use for this Perforce server (for example, \/usr\/local\/p4d)<br \/>\n&#8211;&gt; username is the UNIX user name to use for running this Perforce server<br \/>\n&#8211;&gt; nnnn is the port number for this Perforce server to use<\/p>\n","protected":false},"excerpt":{"rendered":"<p>A. User maintenance tasks 1. Resetting passwords 2. Creating users \/ Deleting users \/ Setting user access 3. Disabling the automatic creation of users 4. Cleaning up files left open&#8230; <\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[370],"tags":[373,4487,4488],"class_list":["post-4565","post","type-post","status-publish","format-standard","hentry","category-perforce","tag-perforce","tag-perforce-administration","tag-perforce-administration-basics"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/4565","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=4565"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/4565\/revisions"}],"predecessor-version":[{"id":4566,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/4565\/revisions\/4566"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=4565"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=4565"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=4565"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}