<?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: Password change problem in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661636#M242162</link>
    <description>No there is no problem when I am using "passwd" command. It works fine with passwd username&lt;BR /&gt;&lt;BR /&gt;I worte a program named "mypaswd" using PAM.&lt;BR /&gt;I enter the correct PAM configuration entry in /etc/pam.conf for my program. &lt;BR /&gt;&lt;BR /&gt;entry looks like &lt;BR /&gt;&lt;BR /&gt;mypasswd account required       /usr/lib/security/libpam_unix.1&lt;BR /&gt;When I am trying to change the password using "mypasswd" program by entering&lt;BR /&gt;&lt;BR /&gt;"mypasswd username"&lt;BR /&gt;&lt;BR /&gt;It asks for old password.&lt;BR /&gt;&lt;BR /&gt;Note that the source code of "mypasswd" is taken some open source implementation of passwd command using PAM. And it woks fine for all other platforms</description>
    <pubDate>Tue, 01 Nov 2005 04:41:24 GMT</pubDate>
    <dc:creator>shijith_1</dc:creator>
    <dc:date>2005-11-01T04:41:24Z</dc:date>
    <item>
      <title>Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661633#M242159</link>
      <description>Hi all,&lt;BR /&gt;&lt;BR /&gt;  I wrote an application in HP UX to change the password like passwd&lt;BR /&gt;command. When I try to change the password of a user, it asks for Old&lt;BR /&gt;password. Note that I am running my application as root. But in the&lt;BR /&gt;same michine the "passwd" command works fine.&lt;BR /&gt;&lt;BR /&gt; Is there is any configuration file exist where I can put my&lt;BR /&gt;application name to work perfectly? Any one have any Idea about this?&lt;BR /&gt;&lt;BR /&gt; Note: The same program works perfectly in all other machines including&lt;BR /&gt;AIX Linux etc.&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 01 Nov 2005 04:14:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661633#M242159</guid>
      <dc:creator>shijith_1</dc:creator>
      <dc:date>2005-11-01T04:14:09Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661634#M242160</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;not sure which arguments u use with passwd, maybe u like to reply it in this post.&lt;BR /&gt;&lt;BR /&gt;regards.</description>
      <pubDate>Tue, 01 Nov 2005 04:21:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661634#M242160</guid>
      <dc:creator>Joseph Loo</dc:creator>
      <dc:date>2005-11-01T04:21:17Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661635#M242161</link>
      <description>perhaps&lt;BR /&gt;&lt;BR /&gt;passwd -d username&lt;BR /&gt;passwd -f username&lt;BR /&gt;&lt;BR /&gt;That might work.&lt;BR /&gt;&lt;BR /&gt;HP-UX is proprietary&lt;BR /&gt;HP-UX works differently in certain ways.&lt;BR /&gt;I think that in spite of this its a better OS.&lt;BR /&gt;&lt;BR /&gt;SEP</description>
      <pubDate>Tue, 01 Nov 2005 04:28:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661635#M242161</guid>
      <dc:creator>Steven E. Protter</dc:creator>
      <dc:date>2005-11-01T04:28:13Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661636#M242162</link>
      <description>No there is no problem when I am using "passwd" command. It works fine with passwd username&lt;BR /&gt;&lt;BR /&gt;I worte a program named "mypaswd" using PAM.&lt;BR /&gt;I enter the correct PAM configuration entry in /etc/pam.conf for my program. &lt;BR /&gt;&lt;BR /&gt;entry looks like &lt;BR /&gt;&lt;BR /&gt;mypasswd account required       /usr/lib/security/libpam_unix.1&lt;BR /&gt;When I am trying to change the password using "mypasswd" program by entering&lt;BR /&gt;&lt;BR /&gt;"mypasswd username"&lt;BR /&gt;&lt;BR /&gt;It asks for old password.&lt;BR /&gt;&lt;BR /&gt;Note that the source code of "mypasswd" is taken some open source implementation of passwd command using PAM. And it woks fine for all other platforms</description>
      <pubDate>Tue, 01 Nov 2005 04:41:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661636#M242162</guid>
      <dc:creator>shijith_1</dc:creator>
      <dc:date>2005-11-01T04:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661637#M242163</link>
      <description>Did you login as root or as another user and then su to root ?&lt;BR /&gt;Could you attach the source if it's open source so that we can examine it ?&lt;BR /&gt;TIA,&lt;BR /&gt;Marco</description>
      <pubDate>Wed, 02 Nov 2005 04:17:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661637#M242163</guid>
      <dc:creator>FERRARI MARCO</dc:creator>
      <dc:date>2005-11-02T04:17:16Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661638#M242164</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;It is possible that the user passwd has reached the expiration time. change the passwd for that user manually and then try running the application if you want to change it again through your application. You  should be fine.  OR, disable passwd aging for this user.&lt;BR /&gt;&lt;BR /&gt;Rgds &lt;BR /&gt;James&lt;BR /&gt;</description>
      <pubDate>Wed, 02 Nov 2005 15:12:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661638#M242164</guid>
      <dc:creator>James George_1</dc:creator>
      <dc:date>2005-11-02T15:12:45Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661639#M242165</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Is the server in trusted mode, in that case you need to edit the tcb database&lt;BR /&gt;goto /tcb/files/auth/r and vi the file root then remove the special characters u_pwd after that you can try to change the passwd and it will not ask for the old password.&lt;BR /&gt;&lt;BR /&gt;If not a trusted system then you can edit the passwd file directly and remove the special characters. Make sure you alwyas make and a copy and have session logged in.&lt;BR /&gt;&lt;BR /&gt;Rgds&lt;BR /&gt;&lt;BR /&gt;HGN</description>
      <pubDate>Wed, 02 Nov 2005 16:00:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661639#M242165</guid>
      <dc:creator>HGN</dc:creator>
      <dc:date>2005-11-02T16:00:23Z</dc:date>
    </item>
    <item>
      <title>Re: Password change problem</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661640#M242166</link>
      <description>&amp;gt;&amp;gt;&amp;gt;Did you login as root or as another user &amp;gt;&amp;gt;&amp;gt;and then su to root ?&lt;BR /&gt;&amp;gt;&amp;gt;&amp;gt;Could you attach the source if it's open &amp;gt;&amp;gt;&amp;gt;source so that we can examine it ?&lt;BR /&gt;&lt;BR /&gt;Here I am attaching the source &lt;BR /&gt;&lt;BR /&gt;#include &lt;SECURITY&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;PWD.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;/*&lt;BR /&gt; * PAM call back function to read the password values&lt;BR /&gt; */&lt;BR /&gt;&lt;BR /&gt;extern int convert(int num_msg,struct pam_message **msg,struct&lt;BR /&gt;pam_response **resp,void *appdata_ptr)&lt;BR /&gt;{&lt;BR /&gt;    // Initialize PAM response object and set password&lt;BR /&gt;    struct pam_response *temp;&lt;BR /&gt;    temp = (struct pam_response *)calloc(num_msg,sizeof(struct&lt;BR /&gt;pam_response));&lt;BR /&gt;    temp[0].resp_retcode = 0;&lt;BR /&gt;    temp[0].resp = strdup((const char*)appdata_ptr);&lt;BR /&gt;    *resp = temp;&lt;BR /&gt;    return PAM_SUCCESS;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;static struct pam_conv conv = {convert,NULL};&lt;BR /&gt;/*&lt;BR /&gt; * Function used to change the password of a user&lt;BR /&gt; */&lt;BR /&gt;int changePasswd(char *user,char *pass)&lt;BR /&gt;{&lt;BR /&gt;    pam_handle_t *pamh=NULL;&lt;BR /&gt;    int retval;&lt;BR /&gt;    struct pam_response *pp=NULL;&lt;BR /&gt;    conv.appdata_ptr = pass;&lt;BR /&gt;    // initialize PAM&lt;BR /&gt;    retval = pam_start("myapp", user, &amp;amp;conv, &amp;amp;pamh);&lt;BR /&gt;    if (retval == PAM_SUCCESS)&lt;BR /&gt;    {&lt;BR /&gt;        // Change password (auth tocken)&lt;BR /&gt;        retval = pam_chauthtok(pamh, PAM_SILENT);&lt;BR /&gt;    }&lt;BR /&gt;    if (retval != PAM_SUCCESS)&lt;BR /&gt;    {&lt;BR /&gt;        return -1;&lt;BR /&gt;    }&lt;BR /&gt;    // End PAM Session&lt;BR /&gt;    if (pam_end(pamh,retval) != PAM_SUCCESS)&lt;BR /&gt;    {&lt;BR /&gt;        pamh = NULL;&lt;BR /&gt;        return -1;&lt;BR /&gt;    }&lt;BR /&gt;    return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;int main()&lt;BR /&gt;{&lt;BR /&gt;        int res = changePasswd("user1","password");&lt;BR /&gt;        printf( "Res = %d", res);&lt;BR /&gt;        return 0;&lt;BR /&gt;&lt;BR /&gt;} &lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/PWD.H&gt;&lt;/STDIO.H&gt;&lt;/SECURITY&gt;</description>
      <pubDate>Mon, 07 Nov 2005 02:05:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/password-change-problem/m-p/3661640#M242166</guid>
      <dc:creator>shijith_1</dc:creator>
      <dc:date>2005-11-07T02:05:17Z</dc:date>
    </item>
  </channel>
</rss>

