_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

PTC MKS Toolkit UNIX APIs extension.


MULTITHREAD SAFETY LEVEL

MT-Safe.


PORTING ISSUES

On 8.1/2012R2/10/2016/2019/11/2022 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 PTC MKS Toolkit UNIX to Windows Porting Guide for more information about security.


AVAILABILITY

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


SEE ALSO

Functions:
getpwnam(), getpwuid()


PTC MKS Toolkit 10.4 Documentation Build 39.