<?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: Change Password in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558996#M226129</link>
    <description>If you can tell us the reason why you want to do this, then hopefully we can come up with a more suitable suggestion.</description>
    <pubDate>Tue, 07 Jun 2005 03:37:41 GMT</pubDate>
    <dc:creator>Vibhor Kumar Agarwal</dc:creator>
    <dc:date>2005-06-07T03:37:41Z</dc:date>
    <item>
      <title>Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558993#M226126</link>
      <description>Hi,&lt;BR /&gt;   How to change user's password in one line command with "passwd".&lt;BR /&gt;   For example :&lt;BR /&gt;   User : ky&lt;BR /&gt;   Original Password : ky123&lt;BR /&gt;   New Password : ky789&lt;BR /&gt;   I want to change ky's passowrd in one line command with "passwd".&lt;BR /&gt;   $passwd ky &lt;ORIGINAL password=""&gt; &lt;NEW password=""&gt; ???&lt;BR /&gt;&lt;BR /&gt;Regards...KY&lt;BR /&gt;  &lt;BR /&gt;&lt;/NEW&gt;&lt;/ORIGINAL&gt;</description>
      <pubDate>Mon, 06 Jun 2005 22:49:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558993#M226126</guid>
      <dc:creator>KY.Chuang</dc:creator>
      <dc:date>2005-06-06T22:49:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558994#M226127</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I don't think it would be possible to change user's password in one command line, but you can achieve the same using "expect" script.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://expect.nist.gov/" target="_blank"&gt;http://expect.nist.gov/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;If you are wondering what is expect, then&lt;BR /&gt;Expect is a tool for automating interactive applications such as telnet, ftp, passwd, fsck, rlogin, tip, etc. Expect really makes this stuff trivial. Expect is also useful for testing these same applications. And by adding Tk, you can also wrap interactive applications in X11 GUIs.&lt;BR /&gt;&lt;BR /&gt;Expect can make easy all sorts of tasks that are prohibitively difficult with anything else. You will find that Expect is an absolutely invaluable tool - using it, you will be able to automate tasks that you've never even thought of before - and you'll be able to do this automation quickly and easily.</description>
      <pubDate>Mon, 06 Jun 2005 23:21:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558994#M226127</guid>
      <dc:creator>Suraj Singh_1</dc:creator>
      <dc:date>2005-06-06T23:21:19Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558995#M226128</link>
      <description>You can use the following expect script after some customized changes. &lt;BR /&gt;&lt;BR /&gt;#!/usr/local/bin/expect -f&lt;BR /&gt;&lt;BR /&gt;set force_conservative 0  &lt;BR /&gt;if {$force_conservative} {&lt;BR /&gt;        set send_slow {1 .1}&lt;BR /&gt;        proc send {ignore arg} {&lt;BR /&gt;                sleep .1&lt;BR /&gt;                exp_send -s -- $arg&lt;BR /&gt;        }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;set timeout 30&lt;BR /&gt;spawn $env(SHELL)&lt;BR /&gt;match_max 5000&lt;BR /&gt;send -- "passwd ky\r"&lt;BR /&gt;expect "Old password:"&lt;BR /&gt;send -- "ky123\r"&lt;BR /&gt;expect "New password:"&lt;BR /&gt;send -- "ky789\r"&lt;BR /&gt;expect "Re-type new password:"&lt;BR /&gt;send -- "ky789\r"&lt;BR /&gt;expect eof</description>
      <pubDate>Mon, 06 Jun 2005 23:56:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558995#M226128</guid>
      <dc:creator>Amit Agarwal_1</dc:creator>
      <dc:date>2005-06-06T23:56:48Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558996#M226129</link>
      <description>If you can tell us the reason why you want to do this, then hopefully we can come up with a more suitable suggestion.</description>
      <pubDate>Tue, 07 Jun 2005 03:37:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558996#M226129</guid>
      <dc:creator>Vibhor Kumar Agarwal</dc:creator>
      <dc:date>2005-06-07T03:37:41Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558997#M226130</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;As mentioned previously, expect is one good solution for this.  I'm not crazy about expect's syntax though.  If you're already familiar with perl, you should consider using the expect module for perl.  All the power of expect with perl's syntax and regular expressions.  Can't beat it...&lt;BR /&gt;&lt;BR /&gt;To answer Victor's question as to why you'd want to do this.  One client for whom I wrote a very similar script had over 200 Solaris and HP servers and a security policy stating that everyone had to change their passwords every 45 days.  Manually changing the passwords literally took an entire day for some of the admins.  After automation, it took 10 minutes.  &lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Tue, 07 Jun 2005 08:00:22 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558997#M226130</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2005-06-07T08:00:22Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558998#M226131</link>
      <description>password command does not work in that way.&lt;BR /&gt;You can use undocumented command /usr/sam/lbin/usermod.sam -p "encrypted password" user_name"&lt;BR /&gt;&lt;BR /&gt;You can user makekey to generate the encryped password. Else, you can use expect tool.&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Tue, 07 Jun 2005 08:10:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558998#M226131</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-06-07T08:10:23Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558999#M226132</link>
      <description>The passwd program itself is designed to try and make sure a human being on a keyboard sets the password.&lt;BR /&gt;&lt;BR /&gt;It may be possible with input redirection to bypass this.&lt;BR /&gt;&lt;BR /&gt;Try a combination like:&lt;BR /&gt;&lt;BR /&gt;passwd &amp;lt; input_file&lt;BR /&gt;&lt;BR /&gt;You may be able to automate the process. Make sure permissions are tight on that input file however.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 07 Jun 2005 08:24:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3558999#M226132</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-06-07T08:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559000#M226133</link>
      <description>Hey;&lt;BR /&gt;&lt;BR /&gt;You can't redirect the stdin to the password command.  It won't work.  You have to use expect, perl/expect, or /usr/sam/lbin/usermod -p...&lt;BR /&gt;&lt;BR /&gt;Doug</description>
      <pubDate>Tue, 07 Jun 2005 08:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559000#M226133</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2005-06-07T08:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559001#M226134</link>
      <description>Hi,&lt;BR /&gt;  Because I want to develop a session which let user can change UNIX's password with this session.&lt;BR /&gt;  In my session, I have to combine user's old password and new password in one script, and let UNIX execute this script.&lt;BR /&gt;  So I have to execute passwd command in one command line.&lt;BR /&gt;&lt;BR /&gt;  Is the command line correct ?&lt;BR /&gt;  $passwd -r &lt;FILE name=""&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks...KY&lt;BR /&gt;  &lt;BR /&gt;&lt;BR /&gt;&lt;/FILE&gt;</description>
      <pubDate>Wed, 08 Jun 2005 00:28:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559001#M226134</guid>
      <dc:creator>KY.Chuang</dc:creator>
      <dc:date>2005-06-08T00:28:03Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559002#M226135</link>
      <description>&amp;gt;&amp;gt; Is the command line correct ?&lt;BR /&gt;&amp;gt;&amp;gt; $passwd -r &lt;FILE name=""&gt;&lt;BR /&gt;&lt;BR /&gt;No, it's not.  The -r option specifies the name resolution protocol.  The files option means you're using the /etc/passwd file.  nis means NIS and NIS+ should, by now, be obvious.  I would think there should be something for ldap, but I didn't see it in the man page.&lt;BR /&gt;&lt;BR /&gt;As the posts have mentioned, in order to do what you're looking to do, you will need perl/expect or expect.  At this point, even the  /usr/lbin/usermod -p won't work because that requires root privileges...&lt;BR /&gt;&lt;BR /&gt;HTH;&lt;BR /&gt;&lt;BR /&gt;Doug&lt;/FILE&gt;</description>
      <pubDate>Wed, 08 Jun 2005 07:44:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559002#M226135</guid>
      <dc:creator>Doug O'Leary</dc:creator>
      <dc:date>2005-06-08T07:44:25Z</dc:date>
    </item>
    <item>
      <title>Re: Change Password</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559003#M226136</link>
      <description>hi chuang...&lt;BR /&gt;&lt;BR /&gt;i will tell you an option, but the security is a problem... still if you need you can try this&lt;BR /&gt;&lt;BR /&gt;after creating a user...&lt;BR /&gt;&lt;BR /&gt;issue&lt;BR /&gt;&lt;BR /&gt;# passwd -d -f &lt;USERNAME&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-d      Allow user to login without a password by deleting it. In untrusted mode this unlocks/activates the user                     account if found locked/deactivated.&lt;BR /&gt;&lt;BR /&gt;-f     Force user to change password upon next login by  expiring the current password&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;so that the user will enter the password at first logon and the administrator need not worry about the user's password part.&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Vinod K&lt;BR /&gt;&lt;/USERNAME&gt;</description>
      <pubDate>Sat, 18 Jun 2005 04:14:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/change-password/m-p/3559003#M226136</guid>
      <dc:creator>vinod_25</dc:creator>
      <dc:date>2005-06-18T04:14:13Z</dc:date>
    </item>
  </channel>
</rss>

