Thursday 24 November 2011

How to controll user access by using "/etc/profile" & /var/adm/inetd.sec ?

By /var/adm/inetd.sec :-

/var/adm/inetd.sec file is used to control the telnet login Remote IP-Address or Hostname or Network based.
If u want to allow particuklar IP address only to access telnet then u have to do below steps.

#vi /var/adm/inetd.sec

telnet allow 10.6.6.6
telnet deny *

>save &exit

then run the below command

#inetd -c

=============================
By /etc/profile :-
If you want to controll the user logiin by based on "login name" or users then you have to use /etc/profile

To control with /etc/profile then,
#vi /etc/profile

--- /etc/profile ---
if [[ ${LOGNAME} = "Raman" || ${LOGNAME} = "dbauser" ]]
then
echo "${LOGNAME} is not allowed to login. Contact administrator
"
sleep 5
exit 1
fi


==============================

1 comment:

  1. Hi Samal,

    I like your post so much, but I am very new to HP-UNIX.

    Could you please post a top pic on: how to monitor root or users activities that they did or change the configuration on HP-Unix.

    I am very thankful if you could post this top pic for me.

    ReplyDelete