{"id":1718,"date":"2017-12-06T04:57:12","date_gmt":"2017-12-06T04:57:12","guid":{"rendered":"http:\/\/www.scmgalaxy.com\/tutorials\/?p=1718"},"modified":"2025-02-01T22:39:35","modified_gmt":"2025-02-01T22:39:35","slug":"basic-perforce-administration","status":"publish","type":"post","link":"https:\/\/www.devopsschool.com\/blog\/basic-perforce-administration\/","title":{"rendered":"Basic Perforce Administration"},"content":{"rendered":"<p><strong>rajeshkumar created the topic: Basic Perforce Administration<\/strong><br \/>\nBasic Perforce Administration<\/p>\n<p>A. User maintenance tasks<\/p>\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<p>B. Administrative operations<\/p>\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>In perforce, There are 2 Types of authentication menthods.<br \/>\n1. passwords<br \/>\n2. tickets<\/p>\n<p>Login to Perforce<br \/>\np4 login<\/p>\n<p>Logout to the perforce<br \/>\np4 logout<\/p>\n<p>Server security levels<\/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:<br \/>\np4 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<p>The default security level is 0: passwords are not required, and password strength is not enforced.<\/p>\n<p>To ensure that all users have passwords, use security level 1. Users of old client programs may still enter weak passwords.<\/p>\n<p>To ensure that all users have strong passwords, use security level 2.<\/p>\n<p>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.<\/p>\n<p>Resetting user passwords<br \/>\np4 passwd username<\/p>\n<p>Creating users<br \/>\np4 user -f username<\/p>\n<p>Preventing creation of users<\/p>\n<p>1. Create a New p4 group or existing groups<br \/>\np4 group p4users<br \/>\n2. Set P4 access to that Groups using<br \/>\np4 protect<br \/>\nand add following..<br \/>\nwrite group p4users * \/\/&#8230;<\/p>\n<p>Deleting obsolete users<br \/>\np4 user -d -f username<\/p>\n<p>Reverting files left open by obsolete users<\/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 \/>\np4 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>Running from inetd on UNIX<\/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>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>p4dservice nnnn\/tcp<\/p>\n<p>where:<br \/>\n&#8211;> p4dservice is the service name you choose for this Perforce server<br \/>\n&#8211;> \/usr\/local\/bin is the directory holding your p4d binary<br \/>\n&#8211;> p4droot is the root directory (P4DROOT) to use for this Perforce server (for example, \/usr\/local\/p4d)<br \/>\n&#8211;> username is the UNIX user name to use for running this Perforce server<br \/>\n&#8211;> nnnn is the port number for this Perforce server to use<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n<p><strong>rajeshkumar replied the topic: Re: Basic Perforce Administration<\/strong><br \/>\nReference links can be found here&#8230;<\/p>\n<p>community.scmgalaxy.com\/pg\/blog\/rajeshku&#8230;force-administration<br \/>\nRegards,<br \/>\nRajesh Kumar<br \/>\nTwitt me @ <a href=\"http:\/\/twitter.com\/RajeshKumarIn\" target=\"_blank\" rel=\"noopener\">twitter.com\/RajeshKumarIn<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>rajeshkumar created the topic: Basic Perforce Administration Basic Perforce Administration A. User maintenance tasks 1. Resetting passwords 2. Creating users \/ Deleting users \/ Setting user access 3. Disabling the&#8230; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_joinchat":[],"footnotes":""},"categories":[370],"tags":[373],"class_list":["post-1718","post","type-post","status-publish","format-standard","hentry","category-perforce","tag-perforce"],"_links":{"self":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1718","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\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/comments?post=1718"}],"version-history":[{"count":1,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1718\/revisions"}],"predecessor-version":[{"id":1719,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/posts\/1718\/revisions\/1719"}],"wp:attachment":[{"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/media?parent=1718"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/categories?post=1718"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.devopsschool.com\/blog\/wp-json\/wp\/v2\/tags?post=1718"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}