Credit goes to:
Kurt Watkins <Watkins_at_howie.swmed.EDU>
R.J. Robinson <r_robins_at_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
:)
Received on Fri Aug 04 1995 - 13:35:15 NZST