reading passwd file with gdm

Glenn Johnson gjohnson at srrc.ars.usda.gov
Tue Jun 10 10:18:45 PDT 2003


On Tue, Jun 10, 2003 at 01:01:03PM -0400, Joe Marcus Clarke wrote:

> On Tue, 10 Jun 2003, Glenn Johnson wrote:
>
> > I am trying to parse the master.passwd file during gdm logins to
> > see if the passwd has reached its expiration time.  The following
> > command works on the command line and in a simple sh script that I
> > tested:
> >
> > CHANGE=`perl -e "print join(':', getpwnam ('$USER'));" | awk -F: '{print $5}'`
> >
> > However, it does not work when put into gdm/PreSession/Default.
> >
>
> Does anything get written to the aging file?

Yes, I had that in the original mail towards the bottom but here it is
again (time value updated of course):

TIME is 1055263524 CHANGE is EXPIRED is

The echo command in the script is:

echo TIME is $TIME CHANGE is $CHANGE EXPIRED is $EXPIRED > ~/aging

So the TIME variable is getting substituted via `date +%s` but the 
CHANGE variable is not.

I verified that perl is found by putting a `which perl` in the script.  
I am thinking that it must be an environment problem.  By the way, I am 
not committed to using perl here if there is another way to extract a 
field from the master.passwd file.

Thanks.

P.S.
Joe, I hope you had a good vacation.

-- 
Glenn Johnson
USDA, ARS, SRRC			 Phone: (504) 286-4252
New Orleans, LA 70124		e-mail: gjohnson at srrc.ars.usda.gov


More information about the freebsd-gnome mailing list