Syntax
int getuserpasswd ( int user [, string prompt] [, int attempts] )
Description
getuserpasswd prompts the specified user for a password. You can specify an optional prompt, which defaults to "Password:". And you can specify the number of attempts to allow; the default is 3.
By default, this function authenticates the user on the policy server. Set the value of getpasswordfromrun in pm.settings to yes to authenticate the user on the client instead.
Returns true if the user enters the correct codeword; otherwise false.
Example
if (getuserpasswd("admin", "Password: ", 1) == false ) { reject; }