Date: Tue, 10 Jun 2003 12:18:42 -0500 From: Glenn Johnson <gjohnson@srrc.ars.usda.gov> To: Joe Marcus Clarke <marcus@freebsd.org> Cc: gnome@freebsd.org Subject: Re: reading passwd file with gdm Message-ID: <20030610171842.GA89639@node1.cluster.srrc.usda.gov> In-Reply-To: <20030610130030.S39727@shumai.marcuscom.com> References: <20030610152735.GA71845@node1.cluster.srrc.usda.gov> <20030610130030.S39727@shumai.marcuscom.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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@srrc.ars.usda.gov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030610171842.GA89639>