i want a perl or shell script so that the user of ftp can change their won password.
i want a perl or shell script so that the user of ftp can change their won password.
Perl code:
See:Code:#!/usr/bin/perl use Unix::PasswdFile; $pw = new Unix::PasswdFile "/etc/passwd"; $pw->passwd("monk", $pw->encpass("My-New-Password")); $pw->commit(); undef $pw;
Change root password using perl script?
Shell script code:
Now, you can write your own logic...Code:echo $PASSWORD | /usr/bin/passwd --stdin $USERNAME
All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]
Thankyou,
i have another question, i am using proftpd and my password file is in different location /etc/proft.passwd and i need shell script to change that password without changing /etc/passwd file.
There are currently 1 users browsing this thread. (0 members and 1 guests)