Chapter Contents

Previous

Next
__passwd

__passwd



Verify or Change a Password

Portability: SAS/C extension


SYNOPSIS
DESCRIPTION
RETURN VALUE


SYNOPSIS

#include <sys/types.h>
#include <pwd.h>

int __passwd(const char *userID, const char *currentPassword,
             const char *newPassword);


DESCRIPTION

__passwd verifies or changes a user password.

userID
identifies the user. userID is a 1 to 8 character, null-terminated, OS/390 user ID.

currentPassword
is the current password.

newPassword
is the new password. The new password replaces the current password. If newPassword is NULL , then currentPassword is verified and not changed.

The passwords are 1 to 8 character, null-terminated strings. Site-dependent restrictions on passwords may apply to both the currentPassword and newPassword arguments.

Note:    This function can only be used by a process that is a member of the BPX.DAEMON class. See IBM's Planning OpenEdition MVS for more information.  [cautionend]

Refer to IBM's OpenEdition MVS Supplement for rlogin (SC23-3847).


RETURN VALUE

__passwd returns a 0 if successful and a -1 if unsuccessful. It is possible for __passwd to fail even if the password is correct, if the password has expired, and a new password was not specified.


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.