RE: How to Restrict a user, not a root, Login to the Console?

Plummer Jason-CJP016 <[email protected]> Fri, 30 Jul 2004 09:37:18 -0500
Newsgroups gmane.comp.security.sun
Message-ID <[email protected]>
Greetings Cris,

You could edit /etc/profile and add a section for that particular id then use "who -m" to detect what terminal is being used.  For example:

    oracle_check=`id | egrep oracle | wc -l`

    if [ ${oracle_check} -ne 0 ]; then
        terminal_check=`who -m 2>&1 | egrep console | wc -l`

        if [ ${terminal_check} -eq 0 ]; then
            echo "Remote access is not allowed for this account"
            exec /bin/false
        fi

    fi


Adios,

Jase-Man
"An Admin uses the network for knowledge and events - never for attack"



-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Thursday, July 29, 2004 2:31 AM
To: [email protected]
Subject: How to Restrict a user, not a root, Login to the Console?




I need a restrict user (oracle for exemple) login to the console. With a superuser root, edit the /etc/default/login file, but with a user???? 

I want that any users who try to remotely log in to this system must first log in with their personal user login, and then use the su command to become a application user.

I'm working on Solaris 8, and don't want implementation a RBAC solution.

Any assistance will be appreciated.

Regards
Cris