Re: Determining whether shadow passwords are enabled?
From: Jem Berkes (jb2002_padding_@pc9.org)Date: 05/31/02
- Next message: Marco Shaw: "Scripted security tool?"
- Previous message: Alan Guy: "Re: iptables, loopback and NMAP self-scan"
- In reply to: Timur Tabi: "Determining whether shadow passwords are enabled?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: Jem Berkes <jb2002_padding_@pc9.org> Date: Thu, 30 May 2002 23:45:25 GMT
> How can I determine in my C program whether shadow passwords are
> enabled? I need to know whether I should call getpwnam() or
> getspnam() to obtain the encrypted password for a given user. Right
> now, I call getpwnam, and if the password is "x", I call getspnam(),
> but I know this is not a good technique.
You could check to see if /etc/shadow exists. Unless you're root though,
you won't be able to actually read the file.
-- Jem E. Berkes Student IEEE (Winnipeg)http://www.pc-tools.net/ Windows, Linux & UNIX software
- Next message: Marco Shaw: "Scripted security tool?"
- Previous message: Alan Guy: "Re: iptables, loopback and NMAP self-scan"
- In reply to: Timur Tabi: "Determining whether shadow passwords are enabled?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|