<?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: Need to remove bug in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111503#M92698</link>
    <description>step one see what the encripted string is for this passwd see below:&lt;BR /&gt;[nlxsms01:root:/]# useradd test                                                                                                 &lt;BR /&gt;[nlxsms01:root:/]# passwd test&lt;BR /&gt;Changing password for test&lt;BR /&gt;Last successful password change for test: NEVER &lt;BR /&gt;Last unsuccessful password change for test: NEVER &lt;BR /&gt;&lt;BR /&gt;Do you want (choose one letter only): &lt;BR /&gt;        pronounceable passwords generated for you (g) &lt;BR /&gt;        a string of letters generated (l) ?&lt;BR /&gt;        to pick your passwords (p) ?&lt;BR /&gt;&lt;BR /&gt;Enter choice here: p&lt;BR /&gt;New password: &lt;BR /&gt;Re-enter new password: &lt;BR /&gt;Passwd successfully changed&lt;BR /&gt;[nlxsms01:root:/]# cat /tcb/files/auth/t/test &lt;BR /&gt;test:u_name=test:u_id#121:\&lt;BR /&gt;        :u_pwd=CdtaJC2yiZ6NY:\&lt;BR /&gt;        :u_auditid#202:\&lt;BR /&gt;        :u_auditflag#1:\&lt;BR /&gt;        :u_succhg#1196792815:u_pwchanger=root:u_suclog#1196792800:u_lock@:\&lt;BR /&gt;        :chkent:&lt;BR /&gt;[nlxsms01:root:/]# &lt;BR /&gt;step 2&lt;BR /&gt;set the passwd:&lt;BR /&gt;ad to the usercreation script:&lt;BR /&gt;password=CdtaJC2yiZ6NY&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p ${password} ${user}&lt;BR /&gt;&lt;BR /&gt;ore&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p CdtaJC2yiZ6NY $user&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Tue, 04 Dec 2007 18:38:41 GMT</pubDate>
    <dc:creator>F Verschuren</dc:creator>
    <dc:date>2007-12-04T18:38:41Z</dc:date>
    <item>
      <title>Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111499#M92694</link>
      <description>Hi every one .&lt;BR /&gt;I was try to create one script to set the initial passswd for all users at one server in one go. &lt;BR /&gt;I created one file "newusers" put all the users in this file ,those need be set initial passwd as "hello123"&lt;BR /&gt;. &lt;BR /&gt;&lt;BR /&gt;I also  created one script "userpasswd.sh" Now I'm trying to run this script from my home directory. The script run normally but not implemented .&lt;BR /&gt;&lt;BR /&gt;Here is some out put &lt;BR /&gt;&lt;BR /&gt;SCRIPT&lt;BR /&gt;&lt;BR /&gt; root@XXX $ cat userpasswd&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;cd /home/xxx&lt;BR /&gt;for i in `cat newusers`;&lt;BR /&gt; &lt;BR /&gt;do&lt;BR /&gt; &lt;BR /&gt;(echo clear; sleep 2;echo "passwd $i";sleep 2;echo "p";sleep 2;echo "hello123";sleep 2;echo "hello123";sleep 2;echo exit)&lt;BR /&gt; &lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;root@xxx$./userpasswd&lt;BR /&gt;clear&lt;BR /&gt;passwd ABC123&lt;BR /&gt;p&lt;BR /&gt;hello123&lt;BR /&gt;hello123&lt;BR /&gt;exit&lt;BR /&gt;clear&lt;BR /&gt;passwd DEF456&lt;BR /&gt;p&lt;BR /&gt;hello123&lt;BR /&gt;hello123&lt;BR /&gt;exit&lt;BR /&gt;clear&lt;BR /&gt;(output truncated only show you for 2 users )&lt;BR /&gt;(change user names as ABC123 and DEF456)&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;Script runs well as above and after completing when I was trying to log in with the user id and new passwd "hello123" its not worked &lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;Anyone can correct my script ?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2007 18:16:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111499#M92694</guid>
      <dc:creator>Salm</dc:creator>
      <dc:date>2007-12-04T18:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111500#M92695</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You are not going to be able to set a password interactively by attempting to supply input the the 'passwd' command.&lt;BR /&gt;&lt;BR /&gt;You can created an encrypted password from a plaintext one using 'crypt' in a shell or (better) Perl script and replace the current encrypted password with a new one in the appropriate line (account) of either '/etc/passwd' or '/etc/shadow', however.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Tue, 04 Dec 2007 18:29:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111500#M92695</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2007-12-04T18:29:29Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111501#M92696</link>
      <description>while are you using echo, echo will just print out what you tell it. Example &lt;BR /&gt;echo "passwd $i" will just print out&lt;BR /&gt;passwd ABCD. Take out the echo's and then try the script.</description>
      <pubDate>Tue, 04 Dec 2007 18:30:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111501#M92696</guid>
      <dc:creator>David Bellamy</dc:creator>
      <dc:date>2007-12-04T18:30:17Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111502#M92697</link>
      <description>Hi Salm,&lt;BR /&gt;&lt;BR /&gt;It will be lot easier if you use expect.&lt;BR /&gt;&lt;BR /&gt;Have a look at this thread for an example.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1148400&amp;amp;admit=109447626+1196792844104+28353475" target="_blank"&gt;http://forums11.itrc.hp.com/service/forums/questionanswer.do?threadId=1148400&amp;amp;admit=109447626+1196792844104+28353475&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Tcl/expect-5.43/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Tcl/expect-5.43/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Robert-Jan</description>
      <pubDate>Tue, 04 Dec 2007 18:33:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111502#M92697</guid>
      <dc:creator>Robert-Jan Goossens</dc:creator>
      <dc:date>2007-12-04T18:33:12Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111503#M92698</link>
      <description>step one see what the encripted string is for this passwd see below:&lt;BR /&gt;[nlxsms01:root:/]# useradd test                                                                                                 &lt;BR /&gt;[nlxsms01:root:/]# passwd test&lt;BR /&gt;Changing password for test&lt;BR /&gt;Last successful password change for test: NEVER &lt;BR /&gt;Last unsuccessful password change for test: NEVER &lt;BR /&gt;&lt;BR /&gt;Do you want (choose one letter only): &lt;BR /&gt;        pronounceable passwords generated for you (g) &lt;BR /&gt;        a string of letters generated (l) ?&lt;BR /&gt;        to pick your passwords (p) ?&lt;BR /&gt;&lt;BR /&gt;Enter choice here: p&lt;BR /&gt;New password: &lt;BR /&gt;Re-enter new password: &lt;BR /&gt;Passwd successfully changed&lt;BR /&gt;[nlxsms01:root:/]# cat /tcb/files/auth/t/test &lt;BR /&gt;test:u_name=test:u_id#121:\&lt;BR /&gt;        :u_pwd=CdtaJC2yiZ6NY:\&lt;BR /&gt;        :u_auditid#202:\&lt;BR /&gt;        :u_auditflag#1:\&lt;BR /&gt;        :u_succhg#1196792815:u_pwchanger=root:u_suclog#1196792800:u_lock@:\&lt;BR /&gt;        :chkent:&lt;BR /&gt;[nlxsms01:root:/]# &lt;BR /&gt;step 2&lt;BR /&gt;set the passwd:&lt;BR /&gt;ad to the usercreation script:&lt;BR /&gt;password=CdtaJC2yiZ6NY&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p ${password} ${user}&lt;BR /&gt;&lt;BR /&gt;ore&lt;BR /&gt;/usr/sam/lbin/usermod.sam -p CdtaJC2yiZ6NY $user&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 04 Dec 2007 18:38:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111503#M92698</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2007-12-04T18:38:41Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111504#M92699</link>
      <description>ps the script that you have written ore expect wil not work on all systems because the passwd comand wants keyboard input...&lt;BR /&gt;to set a passwd on hp you have to change the encripted key, &lt;BR /&gt;in the past I have used the script below, but the samline seems to be working also fine...&lt;BR /&gt;&lt;BR /&gt;ofcause you need to whange the first 3 lines&lt;BR /&gt;&lt;BR /&gt;PW_USER=username&lt;BR /&gt;PW=Xejkfwskfhskkjsd&lt;BR /&gt;SUDO=/???/???/sudo&lt;BR /&gt;&lt;BR /&gt;PW_USER_CUT=`echo $PW_USER|cut -c 1` &lt;BR /&gt;&lt;BR /&gt;echo "-----------`uname -n`---`date`--------------------------"&lt;BR /&gt;#Check if system is trusted and execute trusted code&lt;BR /&gt;$SUDO cp  /tcb/files/auth/$PW_USER_CUT/$PW_USER /tcb/files/auth/$PW_USER_CUT/${PW_USER}.old&lt;BR /&gt;if [ $? -eq 0 ] ; then&lt;BR /&gt; echo "System is trusted --&amp;gt; Changing the /tcb/files/auth/ file"&lt;BR /&gt; $SUDO ksh -c "sed -e \"s/:u_pwd=.*:/:u_pwd=${PW}:/\" /tcb/files/auth/$PW_USER_CUT/${PW_USER}.old &amp;gt; /tcb/files/auth/$PW_USER_CUT/$PW_USER"&lt;BR /&gt;        $SUDO /usr/lbin/modprpw -v $PW_USER&lt;BR /&gt;        $SUDO /usr/lbin/modprpw -k $PW_USER&lt;BR /&gt; $SUDO authck -p&lt;BR /&gt;else&lt;BR /&gt; echo "System is not trusted --&amp;gt; Changing the /etc/passwd file"&lt;BR /&gt;&lt;BR /&gt;#Execute code for non trusted systems&lt;BR /&gt; $SUDO cp /etc/passwd /etc/passwd.old &lt;BR /&gt;if [ $? -eq 0 ] ; then &lt;BR /&gt; $SUDO ksh -c "awk -F: '{ if(/^$PW_USER/) {sub(/:[^:]*:/, \":${PW}:\" ) ; print \$0 } else print \$0 }' \&lt;BR /&gt; /etc/passwd.old &amp;gt;/etc/passwd" &amp;amp;&amp;amp; \&lt;BR /&gt; for i in /etc/passwd /etc/passwd.old;do &lt;BR /&gt;    $SUDO chmod 444 $i&lt;BR /&gt;    $SUDO chown root:sys $i&lt;BR /&gt; done&lt;BR /&gt;else &lt;BR /&gt; echo "ATTENTION: copy of /etc/passwd failed"&lt;BR /&gt;fi&lt;BR /&gt;fi</description>
      <pubDate>Tue, 04 Dec 2007 18:44:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111504#M92699</guid>
      <dc:creator>F Verschuren</dc:creator>
      <dc:date>2007-12-04T18:44:40Z</dc:date>
    </item>
    <item>
      <title>Re: Need to remove bug</title>
      <link>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111505#M92700</link>
      <description>"expect" works fine...at least on untrusted systems.  can't vouch for trusted, but if the passwd commands works, expect will work.&lt;BR /&gt;&lt;BR /&gt;most distributions come w/ "autopasswd" that requires 2 args, the user to change, and the new, unencrypted password.</description>
      <pubDate>Tue, 04 Dec 2007 18:50:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/need-to-remove-bug/m-p/4111505#M92700</guid>
      <dc:creator>OldSchool</dc:creator>
      <dc:date>2007-12-04T18:50:46Z</dc:date>
    </item>
  </channel>
</rss>

