<?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 Scripting Question in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891329#M705296</link>
    <description>Hi Experts,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=837084" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=837084&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Pls see the above thread raised by me. I still awaiting for a complete solution for my proble. Its only partially solved.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam</description>
    <pubDate>Wed, 16 Mar 2005 06:41:08 GMT</pubDate>
    <dc:creator>Ranjith_5</dc:creator>
    <dc:date>2005-03-16T06:41:08Z</dc:date>
    <item>
      <title>Scripting Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891329#M705296</link>
      <description>Hi Experts,&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=837084" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=837084&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Pls see the above thread raised by me. I still awaiting for a complete solution for my proble. Its only partially solved.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Syam</description>
      <pubDate>Wed, 16 Mar 2005 06:41:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891329#M705296</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-03-16T06:41:08Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891330#M705297</link>
      <description>Syam,&lt;BR /&gt;I had another dig around, specifically for trusted system and have found:&lt;BR /&gt;&lt;A href="http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=86321" target="_blank"&gt;http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=86321&lt;/A&gt;&lt;BR /&gt;Please read the man pages attached to that thread for modprpw.&lt;BR /&gt;&lt;BR /&gt;If you need further examples, search the groups for "trusted passwd script"&lt;BR /&gt;&lt;BR /&gt;Regards</description>
      <pubDate>Wed, 16 Mar 2005 07:36:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891330#M705297</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2005-03-16T07:36:04Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891331#M705298</link>
      <description>Syam,&lt;BR /&gt;&lt;BR /&gt;This is totally unsupported and you'd be trying at your own risk, but;&lt;BR /&gt;If you can encrypt the password you want to use, copy it say from a test login then you could amend the following in Peter's script&lt;BR /&gt;&lt;BR /&gt;useradd -c "$username" -g dbuser -m -s /usr/bin/ksh -k /etc/skel -d /home/$logid $logid&lt;BR /&gt;# This is the risky part&lt;BR /&gt;TMPPW=`find /tcb/files/auth -name $logid`&lt;BR /&gt;ed $TMPPW &amp;lt;&amp;lt; EOF&lt;BR /&gt;/pwd&lt;BR /&gt;s/\=.*\:/\=YOURTEMPW\:/&lt;BR /&gt;w&lt;BR /&gt;q&lt;BR /&gt;EOF&lt;BR /&gt;passwd -f $logid&lt;BR /&gt;&lt;BR /&gt;echo "Created user $username"&lt;BR /&gt;done &amp;lt; user.dat&lt;BR /&gt;&lt;BR /&gt;So basically you're setting TMPPW to be the path to the user's TCB file, then doing an 'ed' on the file to substitute your temporary password in the u_pwd field. The line s/\=.*\:/\=YOURTEMPW\:/ is substituting everything between the = and the : with YOURTEMPW (which is your encrypted password). Then you do a passwd -f to force the user to pick a new password.&lt;BR /&gt;&lt;BR /&gt;Why is it risky, because it's not a supported method, so make sure you backup things first.&lt;BR /&gt;&lt;BR /&gt;Good luck&lt;BR /&gt;&lt;BR /&gt;Robert</description>
      <pubDate>Fri, 18 Mar 2005 17:01:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891331#M705298</guid>
      <dc:creator>Robert Salter</dc:creator>
      <dc:date>2005-03-18T17:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: Scripting Question</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891332#M705299</link>
      <description>Hi ,&lt;BR /&gt;&lt;BR /&gt;Hi I couldn't go through the second post or test that.My problem was already solved.&lt;BR /&gt;&lt;BR /&gt;I modified my script again as follows and it is now able to server my purpose. Thanks for all.&lt;BR /&gt;&lt;BR /&gt;############################################################&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;groupadd dbuser&lt;BR /&gt;rm -f passwords.dat&lt;BR /&gt;#read all the data in the file user.dat&lt;BR /&gt;while read data&lt;BR /&gt;do&lt;BR /&gt;#split the fields up&lt;BR /&gt;#first field&lt;BR /&gt;logid=`echo $data | cut -d' ' -f1`&lt;BR /&gt;#second field onwards&lt;BR /&gt;username=`echo $data | cut -d' ' -f2-`&lt;BR /&gt;&lt;BR /&gt;useradd -c "$username" -g dbuser -m -s /usr/bin/ksh -k /etc/skel -d /home/db$logid db$logid&lt;BR /&gt;/usr/lbin/modprpw -x db$logid &amp;gt;&amp;gt; passwords.dat&lt;BR /&gt;echo "Created user $username"&lt;BR /&gt;done &amp;lt; user.dat&lt;BR /&gt;cat passwords.dat|cut -f2 -d"="&amp;gt;passwords.txt&lt;BR /&gt;rm -f passwords.dat&lt;BR /&gt;&lt;BR /&gt;########################################################&lt;BR /&gt;&lt;BR /&gt;The above script stored the initial passwords in a txt file called passwords.txt. I only need to do cat passwords.txt and copy paste to excel. &lt;BR /&gt;My Problem is solved.&lt;BR /&gt;&lt;BR /&gt;Closing this thread. Thanks all who replied.&lt;BR /&gt;&lt;BR /&gt;regards,&lt;BR /&gt;Syam</description>
      <pubDate>Sun, 20 Mar 2005 02:00:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scripting-question/m-p/4891332#M705299</guid>
      <dc:creator>Ranjith_5</dc:creator>
      <dc:date>2005-03-20T02:00:44Z</dc:date>
    </item>
  </channel>
</rss>

