Hi, We use Samba (without pam)in our office and needed to do the following things 1.have users change their password once in 30 days
2.when a user wants to log in .. after 3 times of username/password mismatch the password should be reset
.. it has been quiet some time since i wrote programs in C ..i looked at the code (in C ) and could not figure out much so what i thought was when i enter a wrong password a entry is generated in the log file ,i search for that entry in the c files and in the next line i will do a system ("/use/bin/perl myperl.pl username pass") ..this will store the username and password and a counter in a database and when the counter reaches 5 i can reset the samba password ... can the wise monks tell me if this is a good solution and are there any perl modules through which i can reset the samba password ..also how can i force a user to change his password once in 30 days ...is there any other way of acheiving this ??

In reply to Samba Reset password by mkirank

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.