<?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 Re: Adding multiple users - trusted systems in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169830#M738871</link>
    <description>Hello,&lt;BR /&gt;&lt;BR /&gt;You already got lot of useful advice and scripts.&lt;BR /&gt;&lt;BR /&gt;For a different reason, I wrote a Perl&lt;BR /&gt;script that does the same on&lt;BR /&gt;AIX, HP-UX, Linux, Tru64, and Solaris.&lt;BR /&gt;Even if you do not need it, you&lt;BR /&gt;can at least check which commands are used &lt;BR /&gt;and compare how it is done in different&lt;BR /&gt;OSes :)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.circlingcycle.com.au/Unix-sources/add-batch-Unix-accounts.pl.txt" target="_blank"&gt;http://www.circlingcycle.com.au/Unix-sources/add-batch-Unix-accounts.pl.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 28 Mar 2008 22:14:30 GMT</pubDate>
    <dc:creator>VK2COT</dc:creator>
    <dc:date>2008-03-28T22:14:30Z</dc:date>
    <item>
      <title>Adding multiple users - trusted systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169827#M738868</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;My experience with HP-UX is not very vast, but I have done some searching before I decided to post this question here. I need to add multiple (quite a lot) on many new servers (trusted systems). Is there a way, or some existing scripts that can accomplish this? Thank you.&lt;BR /&gt;&lt;BR /&gt;P.S. My scripting techniques are at basic level.</description>
      <pubDate>Fri, 28 Mar 2008 12:04:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169827#M738868</guid>
      <dc:creator>sergiu1103</dc:creator>
      <dc:date>2008-03-28T12:04:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple users - trusted systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169828#M738869</link>
      <description>Well I use this script when adding users to a new system.  Bscically I use the /etc/passwd file to creat them an run this script on that file to create them&lt;BR /&gt;&lt;BR /&gt;cat userinfo |while read line&lt;BR /&gt;do&lt;BR /&gt;USER=$(echo $line|awk '{FS=":";print $1}')&lt;BR /&gt;PASS=$(echo $line|awk '{FS=":";print $2}')&lt;BR /&gt;USERID=$(echo $line|awk '{FS=":";print $3}')&lt;BR /&gt;GID=$(echo $line|awk '{FS=":";print $4}')&lt;BR /&gt;INFO=$(echo $line|awk '{FS=":";print $5}')&lt;BR /&gt;HOME=$(echo $line|awk '{FS=":";print $6}')&lt;BR /&gt;SHELL=$(echo $line|awk '{FS=":";print $7}')&lt;BR /&gt;echo "Adding $USER"&lt;BR /&gt;useradd -u $USERID -g $GID -s $SHELL -c "$INFO" -o -d $HOME -m -k /etc/skel $USER&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p`echo "$PASS"` $USER&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;where the file userinfo whitch is just /etc/passwd looks like this:&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;dclifton:QNlEo8shV4aAs:281:300:Dawn Clifton:/ifas/admin:/bin/ksh&lt;BR /&gt;dcomegys:AiBlSJmBOE8GQ:282:300:Debbie Comegys:/ifas/admin:/bin/ksh&lt;BR /&gt;ddeakin:J093/LdkPWe4.:283:300:Deborah Deakin:/ifas/admin:/bin/ksh&lt;BR /&gt;deborahv:d4J3aJqNPmXlY:284:300:Deborah Vessey:/ifas/admin:/bin/ksh&lt;BR /&gt;debraa:l3i8xgyOEBVpE:285:300:Debra Aragon:/ifas/admin:/bin/ksh&lt;BR /&gt;deel:m6FKASCYkdCMM:286:300:Delores Leschinsky:/ifas/admin:/bin/ksh&lt;BR /&gt;dellis:05/iQ.n/Yx1YU:287:300:Dean M Ellis:/ifas/admin:/bin/ksh&lt;BR /&gt;dfotsch:i5bZyPUeYJNkk:288:300:Dan Fotsch:/ifas/admin:/bin/ksh&lt;BR /&gt;dgeisert:x8EA/6uTHJdYs:289:300:Donna Geisert:/ifas/admin:/bin/ksh&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Mar 2008 13:19:26 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169828#M738869</guid>
      <dc:creator>Paul Sperry</dc:creator>
      <dc:date>2008-03-28T13:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple users - trusted systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169829#M738870</link>
      <description>I do pretty much the same as Paul.&lt;BR /&gt;&lt;BR /&gt;I have a script that prompts for usernames, group, home dir, etc.. then use that to create a script full of usermod commands.&lt;BR /&gt;&lt;BR /&gt;if you have a list here is a simplistic approach.&lt;BR /&gt;&lt;BR /&gt;list.txt contents:&lt;BR /&gt;jdoe John Doe &lt;BR /&gt;bdoe Bill Doe&lt;BR /&gt;&lt;BR /&gt;script contents:&lt;BR /&gt;uid=1000&lt;BR /&gt;ok=&lt;BR /&gt;cat list.txt|while read uname fname lname&lt;BR /&gt;do&lt;BR /&gt;while [[ $ok != "ok" ]]&lt;BR /&gt;do&lt;BR /&gt;if grep ":$uid:" /etc/passwd &amp;gt; /dev/null&lt;BR /&gt;then&lt;BR /&gt;        (( uid = uid + 1 ))&lt;BR /&gt;else&lt;BR /&gt;        ok=ok&lt;BR /&gt;fi&lt;BR /&gt;done&lt;BR /&gt;useradd -u $uid -c "$fname $lname" -m -s /usr/bin/ksh $uname&lt;BR /&gt;ok=&lt;BR /&gt;done&lt;BR /&gt;#end-of-script&lt;BR /&gt;&lt;BR /&gt;This is about as simple as it gets.&lt;BR /&gt;looks for next unused uid over 1000, creates username and comment provided by list.txt then uses default /usr/bin/ksh shell and creates default home directory.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Mar 2008 16:16:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169829#M738870</guid>
      <dc:creator>Tim Nelson</dc:creator>
      <dc:date>2008-03-28T16:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple users - trusted systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169830#M738871</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;You already got lot of useful advice and scripts.&lt;BR /&gt;&lt;BR /&gt;For a different reason, I wrote a Perl&lt;BR /&gt;script that does the same on&lt;BR /&gt;AIX, HP-UX, Linux, Tru64, and Solaris.&lt;BR /&gt;Even if you do not need it, you&lt;BR /&gt;can at least check which commands are used &lt;BR /&gt;and compare how it is done in different&lt;BR /&gt;OSes :)&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.circlingcycle.com.au/Unix-sources/add-batch-Unix-accounts.pl.txt" target="_blank"&gt;http://www.circlingcycle.com.au/Unix-sources/add-batch-Unix-accounts.pl.txt&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;&lt;BR /&gt;VK2COT&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 28 Mar 2008 22:14:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169830#M738871</guid>
      <dc:creator>VK2COT</dc:creator>
      <dc:date>2008-03-28T22:14:30Z</dc:date>
    </item>
    <item>
      <title>Re: Adding multiple users - trusted systems</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169831#M738872</link>
      <description>Thank you all for your quick and helpful replies. Dusan, your script looks like it required a lot of work, thank you for sharing. I think I will be using it, since I am dealing with multiple operating systems.</description>
      <pubDate>Sat, 29 Mar 2008 12:15:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/adding-multiple-users-trusted-systems/m-p/4169831#M738872</guid>
      <dc:creator>sergiu1103</dc:creator>
      <dc:date>2008-03-29T12:15:28Z</dc:date>
    </item>
  </channel>
</rss>

