[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] getpw()
- Subject: [ale] getpw()
- From: asife at mindspring.com (Asif)
- Date: Wed, 24 Jan 2001 10:01:52 +0000
I have done something like this on solaris. Apparently, there are two system calls that you can use;
struct passwd *ptr;
ptr = getpwnam(username);
return ptr->pw_passwd;
For shadow passwords try this:
struct spwd *ptr;
ptr = getspnam(username);
return ptr->sp_pwdp;
Hope it helps.
Asif
chrisf at computone.com wrote:
> Is there a function I can use to get the password field from /etc/passwd?
>
> I can use getpw() to get the whole line? Is there a way to get the field without me cuting the string apart?
>
> Thanks,
>
> Chris
>
> --
> To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.