<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to create users/roles for ArcGIS Server using ArcPy? in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-create-users-roles-for-arcgis-server-using/m-p/572938#M22114</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to automate this process using ArcPy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the documentation found here;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Create_users_and_roles_from_a_CSV_file/0154000005z1000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Create_users_and_roles_from_a_CSV_file/0154000005z1000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Help 10.1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am scripting this from the ArcMap Python Window. My error is;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;Runtime error &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 231, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 20, in main&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;EOFError: EOF when reading a line&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; # This script creates a bank of users and roles given a comma-separated text file
... #&amp;nbsp; They should be listed in the following format and saved in a file with a .txt extension:
... #
... #&amp;nbsp; User,Role,RoleType,Password,EMail,FullName,Description
&lt;SPAN&gt;... #&amp;nbsp; John,Admins,ADMINISTER,changeme,&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:johndoe@esri.com" rel="nofollow noopener noreferrer" target="_blank"&gt;johndoe@esri.com&lt;/A&gt;&lt;SPAN&gt;,John Doe,Server admin&lt;/SPAN&gt;
&lt;SPAN&gt;... #&amp;nbsp; Jane,Publishers,PUBLISH,changeme,&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:janedoe@esri.com" rel="nofollow noopener noreferrer" target="_blank"&gt;janedoe@esri.com&lt;/A&gt;&lt;SPAN&gt;,Jane Doe,Server publisher&lt;/SPAN&gt;
... #&amp;nbsp; Etc.
... 
... import json, urllib,httplib
... 
... # For system tools
... import sys
... 
... # For reading passwords without echoing
... import getpass
... 
... 
... def main(argv=None):
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Ask for admin/publisher user name and password
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; username = raw_input("myUserName:")
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; password = getpass.getpass("myPassword:")
... 
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Ask for server name &amp;amp; port
&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverName = raw_input("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://myServer/arcgis/admin/login" rel="nofollow noopener noreferrer" target="_blank"&gt;http://myServer/arcgis/admin/login&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverPort = 6080&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 00:40:01 GMT</pubDate>
    <dc:creator>GeoffreyWest</dc:creator>
    <dc:date>2021-12-12T00:40:01Z</dc:date>
    <item>
      <title>How to create users/roles for ArcGIS Server using ArcPy?</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-create-users-roles-for-arcgis-server-using/m-p/572938#M22114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to automate this process using ArcPy. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am following the documentation found here;&lt;/P&gt;&lt;P&gt;&lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Create_users_and_roles_from_a_CSV_file/0154000005z1000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/Example_Create_users_and_roles_from_a_CSV_file/0154000005z1000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;ArcGIS Help 10.1&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am scripting this from the ArcMap Python Window. My error is;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;Runtime error &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;Traceback (most recent call last):&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 231, in &amp;lt;module&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 20, in main&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt; color: #e23d39;"&gt;EOFError: EOF when reading a line&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt; # This script creates a bank of users and roles given a comma-separated text file
... #&amp;nbsp; They should be listed in the following format and saved in a file with a .txt extension:
... #
... #&amp;nbsp; User,Role,RoleType,Password,EMail,FullName,Description
&lt;SPAN&gt;... #&amp;nbsp; John,Admins,ADMINISTER,changeme,&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:johndoe@esri.com" rel="nofollow noopener noreferrer" target="_blank"&gt;johndoe@esri.com&lt;/A&gt;&lt;SPAN&gt;,John Doe,Server admin&lt;/SPAN&gt;
&lt;SPAN&gt;... #&amp;nbsp; Jane,Publishers,PUBLISH,changeme,&lt;/SPAN&gt;&lt;A class="jive-link-email-small" href="mailto:janedoe@esri.com" rel="nofollow noopener noreferrer" target="_blank"&gt;janedoe@esri.com&lt;/A&gt;&lt;SPAN&gt;,Jane Doe,Server publisher&lt;/SPAN&gt;
... #&amp;nbsp; Etc.
... 
... import json, urllib,httplib
... 
... # For system tools
... import sys
... 
... # For reading passwords without echoing
... import getpass
... 
... 
... def main(argv=None):
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Ask for admin/publisher user name and password
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; username = raw_input("myUserName:")
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; password = getpass.getpass("myPassword:")
... 
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Ask for server name &amp;amp; port
&lt;SPAN&gt;...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverName = raw_input("&lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://myServer/arcgis/admin/login" rel="nofollow noopener noreferrer" target="_blank"&gt;http://myServer/arcgis/admin/login&lt;/A&gt;&lt;SPAN&gt;")&lt;/SPAN&gt;
...&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; serverPort = 6080&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 00:40:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/how-to-create-users-roles-for-arcgis-server-using/m-p/572938#M22114</guid>
      <dc:creator>GeoffreyWest</dc:creator>
      <dc:date>2021-12-12T00:40:01Z</dc:date>
    </item>
  </channel>
</rss>

