Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Jul 2001 16:53:13 -0300 (ART)
From:      Fernando Gleiser <fgleiser@cactus.fi.uba.ar>
To:        Ronnie Clark <RClark@swst.com>
Cc:        "'Freebsd-Questions (E-mail)" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: login script question
Message-ID:  <20010712164926.P20585-100000@cactus.fi.uba.ar>
In-Reply-To: <EE037FA03845D41190F400508B2D851105413D9D@SWS_EXCG6>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 12 Jul 2001, Ronnie Clark wrote:

> Hello all. I am trying my hand at perl scripting now that I am comfortable
> with the FreeBSD OS itself. I wish to write a login script that acknowledges
> the use when they log in. But, I need to know two things:
> 1. What variable is assigned to the login name? In other words, how does one
> tell the script to pull the login name? (i.e in the script $name = "?" )

It is in the ENV hash: $ENV{'USER'}

> 2. Where would one put a login script? I looked in /etc, but nothing jumped
> out.

If you want to run the script when every user logs in, add the call to it
in /etc/profile and /etc/csh.login

>
> Thanks in advance for the help.


Hope this helps.



			Fer
>
> Thank you,
> RC
>
>
>
>
>
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-questions" in the body of the message
>


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010712164926.P20585-100000>