File executed instead user .profiles

From: Cenon B.C. Marana Jr. <bonn_at_durian.usc.edu.ph>
Date: Tue, 1 Aug 1995 19:46:59 +0800 (HKT)

Hello to all!

This may be somewhat related to question 2 of my previous mail Re: cd,
.profiles and tcpwrappers.

To rephrase my question, was planning to execute a file accessible to
specified users (with the corresponding configurations) upon login WITHOUT
accessing the user's .profile (considering that it would be a hassle to do
add a command one by one on the user's .profile)

This is what I have in mind for the passwd file..
from:

username::UID:GID:Username_description:home_directory:/usr/bin/ksh
to:

username::UID:GID:user_description:home_directory:/directory/user_setup

where the filename user_setup contains:
command 1
command 2
...

With this setup, for security reasons, such commands/setups that will be
executed will be tamper proof by the user and cannot be modified in one
way or the other as long as the file has a no write permission to others
and the group, but to the owner -- which is root (755 permission) --- and
not like those files found at the user's home directory where they could
be deleted or modified by the user ..

What I would write inside the user_setup file considering that it is
already 755 permissions is:


#user_setup - short script for users
PATH=<pathname>
export PATH
stty dec
tset -I -Q
PS1="`hostname`> "
MAIL=/usr/spool/mail/$USER
finger localhost
user_login
exit


What would have I to add so that it would execute coz when I tested it
with just this configuration, it seems that it fails to execute and
instead, still execute the shell.

Could someone comment on such move?

Bonn :)
Received on Tue Aug 01 1995 - 14:07:53 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT