Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 14 Apr 2004 00:13:31 -0500
From:      "Micheal Patterson" <micheal@tsgincorporated.com>
To:        "Doug Hardie" <bc979@lafn.org>, <freebsd-questions@freebsd.org>
Subject:   Re: Unusual login requirement
Message-ID:  <019201c421df$3c2cd050$0201a8c0@dredster>
References:  <Pine.LNX.4.21.0404131401220.1330-100000@slacknet.slacknet.com><20040413235143.4c2cb911@it.buh.cameradicommercio.ro> <035C9EBA-8DCA-11D8-958E-000393681B06@lafn.org>

next in thread | previous in thread | raw e-mail | index | archive | help

----- Original Message ----- 
From: "Doug Hardie" <bc979@lafn.org>
To: <freebsd-questions@freebsd.org>
Sent: Tuesday, April 13, 2004 11:12 PM
Subject: Unusual login requirement


> I am trying to figure out how to implement an unusual login requirement
> and haven't found a good approach yet.  What I need is to have a
> specific user id that when it is logged in it executes a specific
> script and then immediately logs out.  Basically what it needs to do is
> run a make that builds a CD from a bunch of files and then burns the
> CD.  Obviously a blank CD would need to be in the burner first.  I
> don't want a general login as this would be used by a person who should
> not have access to the system.  I just need him to be able to burn a CD
> frequently.
>
> My first throught was to create a script and set it as the shell in the
> passwd file and add it to /etc/shells.  Is that the best approach?  I
> am not concerned about the user breaking out of the script as he is
> trusted.  I just don't want to create a regular user account for him.
> The server is running FreeBSD 4.6.  Thanks,
>
> -- Doug
>


If you use bash, you can create your script, start it in the .profile and
have exit directly below it. That way, when the script finishes, it will
exit out. Also, even though this is not a concern for you, this is a
safeguard should they break out of the script, it kills the session too.

--

Micheal Patterson
Network Administration
TSG Incorporated
405-917-0600



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?019201c421df$3c2cd050$0201a8c0>