tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: "Cenon B.C. Marana Jr." <bonn () durian ! usc ! edu ! ph>
To: tru64-unix-managers
Subject: SUMMARY: File executed instead user .profiles
Date: Fri, 04 Aug 1995 11:13:36 +0000	[thread overview]
Message-ID: <96075322406440.tru64-unix-managers.marc@archive.invalid> (raw)


Credit goes to:
Kurt Watkins   <Watkins@howie.swmed.EDU>
R.J. Robinson  <r_robins@tec.nh.us>

My question:

>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.

What was needed was that the full pathname of the file that I intended to be 
executed should be added at the /etc/shells.

Failing to include the pathname at that particular file instead executes 
the default shell, inspite the fact that the full pathname is already 
added at the /etc/passwd file like the one below:

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

Bonn
:)

                 reply	other threads:[~1995-08-04 11:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox