Find the answer to your Linux question:
Results 1 to 2 of 2
Hi i want to write a perl script say chpasswd.pl that takes 1 agument e.g chpasswd.pl <username> Function of this script should be to canged the password of the username ...
  1. #1
    Just Joined!
    Join Date
    Jul 2008
    Posts
    22

    Change password for other users

    Hi

    i want to write a perl script say chpasswd.pl that takes 1 agument e.g

    chpasswd.pl <username>

    Function of this script should be to canged the password of the username passed.

    Also i should be able to run chpasswd.pl as non root user.

    eb user abc is running "chpasswd.pl pqr" to cahnge the password of pqr.

    I want that when this script is run then it should ask for root password and then the password for pqr to be set.

    Thanks for your help

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,316
    Use sudo to gain root privileges in script and it will work fine.
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...