I had setup a passwd file , and trying to retrive the username and passwd from it, using perl getpwnam function.
Code:
#!/usr/bin/perl
($name, $passwd, $uid, $gid, $quota,
$comment, $gcos, $dir, $shell) = getpwnam("myuser");
print "Name = $name\n";
print "Password = $passwd\n";
But it is trying to read the details from /etc/shadow file. How can I set the function getpwnam to read the request from my password file manually created.
Thanks