With the following the person can login as sybase, but he will have to manual read the sybase profile (ie . ./.profile)
from deja:
From: Neil W Rickert (rickert+nn@cs.niu.edu)
Message 2 in thread
Subject: Re: Disable remote login for given user
Newsgroups: comp.unix.solaris
View this article only
Date: 2001-02-04 16:00:04 PST
"Alex Hopcroft" <ahopcroft@hemscott.net> writes:
>I have a shared user which I want to disable the capability for users to log
>directly into. I do want then to be able to su into the account from their
>own account. Its easy to do for the root user obviously, but can it be done
>for other users?
This is not perfect, but might be good enough.
Put a line in '/etc/profile'
if [ "$LOGNAME" = "thisuser" ] ; then logout
Use '/etc/.login' and csh syntax for the equivalent if this
is a csh account.
The idea is that this test is only carried out for login shell. It
should block direct login. It will also block "su - thisuser" since
that simulates a login shell. But it should allow su without the '-'.