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 <details>"
sleep 5
exit 1
fi


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

Post a Comment

0 Comments