_NutValidatePassword()

verify user password 

Function


SYNOPSIS

#include <nutc.h>

int _NutValidatePassword(const char *user, const char *password);


DESCRIPTION

The _NutValidatePassword() function verifies a password for a user. The password is verified against the SAM database.

If user is logged on locally, _NutValidatePassword() only looks at the local SAM database. If user is logged on to a domain, the NuTCRACKER Platform first looks in the local SAM database. If the user does not exist or the password is invalid, the NuTCRACKER Platform queries the domain SAM database.

Note:

Passwords are case-sensitive. User names are not case-sensitive.


PARAMETERS

user 

Specifies a user name (up to 21 characters, including the terminating null character).

password 

Specifies the password.


RETURN VALUES

If verification is successful, the _NutValidatePassword() function returns TRUE. If the password is invalid, it returns FALSE. If a system error occurs, _NutValidatePassword() sets errno to:

EINVAL 

The user or password does not exist in either database.


CONFORMANCE

MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

On Windows NT/2000/XP/2003/Vista the user calling _NutValidatePassword() must have the Act as part of the operating system and Replace a process level token user rights assigned (this is the default for members of the Administrators group). Refer to Security in the Windows Concepts chapter of the MKS Toolkit UNIX to Windows Porting Guide for more information about security.


AVAILABILITY

MKS Toolkit for Professional Developers
MKS Toolkit for Enterprise Developers
MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
getpwnam(), getpwuid()


MKS Toolkit 9.2 Documentation Build 16.