User Profile

Collapse

Profile Sidebar

Collapse
Cecil1984
Cecil1984
Last Activity: Mar 30 '08, 07:54 AM
Joined: Mar 28 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Cecil1984
    replied to conform the password
    in Perl
    thanks for replying, i just want to compare the current input password matching the password saved in system, making sure the user is valid. that is all. thanks for any help. and i change my script as follow based on your suggesting,

    [CODE=perl]#!/usr/bin/perl
    use Getopt::Std;
    getopt('a:u:');

    # First command switch, adding a user.
    if ($opt_a)
    {
    print "Adding user ",...
    See more | Go to post
    Last edited by eWish; Mar 30 '08, 02:38 PM. Reason: Please use code tags

    Leave a comment:


  • Cecil1984
    replied to send email
    in Perl
    thanks for reply, my script as following

    [CODE=perl]open (SENDMAIL, "| /usr/lib/sendmail -t -n -oi");
    print SENDMAIL "From: user\@domain.co m\n";
    print SENDMAIL "To: root@domain.com \n";
    print SENDMAIL "Subject: testing 123\n\n";
    print SENDMAIL "Body: hello every\n";
    close (SENDMAIL);[/CODE]

    but i do not why when i run the script,...
    See more | Go to post
    Last edited by eWish; Mar 30 '08, 02:36 PM. Reason: Please use code tags

    Leave a comment:


  • Cecil1984
    replied to send email
    in Perl
    yes, i just begin to learn perl, so any help for me to write the script. thanks very much.
    See more | Go to post

    Leave a comment:


  • Cecil1984
    replied to conform the password
    in Perl
    thanks for your replying, so based on my problem, how can i change my script making it working. thanks very much.
    See more | Go to post

    Leave a comment:


  • Cecil1984
    started a topic conform the password
    in Perl

    conform the password

    hi everyone

    could anyone help to conform the password, my script is following

    [CODE=perl]#!/usr/bin/perl
    use Getopt::Std;
    getopt('a:u:');

    # First command switch, adding a user.
    if ($opt_a)
    {
    print "Adding user ", $opt_a, "\n";
    password_creati on();
    if ($pass1 eq $pass2) { print "\nSuccess. Adding user...
    See more | Go to post
    Last edited by eWish; Mar 29 '08, 01:08 AM. Reason: Please use code tags

  • Cecil1984
    replied to send email
    in Perl
    thanks for your replying, i checked the link which you gave me. i think i just confused my question, my question is : for example, once you did wrong password in unix, the email would be sent to you. i think the email destination is unix's file, like using 'mail' to check the email in unix.
    See more | Go to post

    Leave a comment:


  • Cecil1984
    started a topic send email
    in Perl

    send email

    hi guys,
    could any one help me how to write perl script to send email in unix system.

    thank you for any helping.
    See more | Go to post

  • Cecil1984
    replied to Perl: invoke value
    in Perl
    thanks your reply!

    actually, I need add new user into unix by using -a switch, and after that when you update user by using -u switch, how can i check the current password when i update the user password.
    [CODE=perl]#!/usr/bin/perl
    use Getopt::Std;
    getopt('a:u:');

    # First command switch, adding a user.
    if ($opt_a)
    {
    print "Adding user ", $opt_a, "\n";...
    See more | Go to post
    Last edited by eWish; Mar 28 '08, 07:59 PM. Reason: Please use code tags

    Leave a comment:


  • Cecil1984
    started a topic Perl: invoke value
    in Perl

    Perl: invoke value

    hi everyone

    could everyone tell me how can i invoke value from getopt('u') to getopt('a')?

    for example
    [CODE=perl]
    getopt('u);
    if (opt_u)
    {
    print"enter something:\n";
    $input=<STDIN>;
    }

    getopt('a');
    if(opt_a)
    {
    #here, how can i use the value $input from getopt('u')
    }[/CODE]

    thank you for any help...
    See more | Go to post
    Last edited by eWish; Mar 28 '08, 01:35 PM. Reason: Please use code tags
No activity results to display
Show More
Working...