05-11-2016
I used to do this sort of thing on a aix 4.2 ... So long time ago... Using Madeingermany's solution, not sure now that I used that format in hosts.allow.. It may have been only the IP, I rememberes also using mac addresses to filter...
The trick after ( as say using IP or Mac) was in .profile to check if that user was the one expected ( IP or MAC ) andmaking root own the .profile etc.. I was easy here as these users entered in a menu to access the application and never have the chance to get to a terminal prompt...
You could try to add a condition as you expect different users using same IP...
Thoses were the days without ssh...
So currently I would favor zaxxon's solution
my 2 cents
All the best
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Our users have the tendency to use only one login account, to do their jobs. Obvious itīs a matter of training our users. But our internal audit team insists on restrictions from our system.
So is there an option to restrict an account to only login once into the system?
We use HP-UX 11.0.
... (0 Replies)
Discussion started by: Egroman
0 Replies
2. UNIX for Advanced & Expert Users
Hi all,
I want to know the time when a perticular user is created, atleat in which year it is created. Could any one help me in this issue.
Thanks in advance.
Regards,
M.Sukumar (1 Reply)
Discussion started by: sukumar
1 Replies
3. AIX
I am just wondering if there is a way I can obtain a free shell account for an AIX server that I can make test drive on it. I tried google search and ibm's web site but couldn't find anything..
regards, (2 Replies)
Discussion started by: milhan
2 Replies
4. AIX
Hello,
I am using wu-ftp 2.4.2 in AIX 5.2. I wanted to restrict high ports for dataconnection. by default dataconnection ports will be from range 1024 to 65536. But i wanted to restrict it to some range like 10000 - 10500. This setting is to enable ports at client firewall.
Please let me... (0 Replies)
Discussion started by: balareddy
0 Replies
5. Shell Programming and Scripting
How to restrict running one instance of scp at any time? (2 Replies)
Discussion started by: proactiveaditya
2 Replies
6. Solaris
My OS is Solaris 10, I would like to know if there is any way to restrict user login to the system (either remote or console login) after certain time, say 20:00 on Mon to Fri and whole day on SAT and SUN???
Sorry that I am a new user on Unix System.
Any comment is fully appreciated!!!
Alex (7 Replies)
Discussion started by: alessandro31
7 Replies
7. AIX
Hi there,
I am new to AIX environment, when I set up NIS Client for an AIX 5.3 Machine to connect to a Linux NIS Master, everything seems to be okie:
/etc/passwd: +::0:0:::
/etc/group: +:
ps -ef | egrep "ypbind": /usr/lib/netsvc/yp/ypbind -ypsetme -ypsetme
I can get all account... (0 Replies)
Discussion started by: quanba
0 Replies
8. UNIX for Advanced & Expert Users
Hello all,
I am using IBM Directory Server (as a part of AIX7 extension pack) in an AIX environment.
To set up the server I use command:
mksecldap -s -a cn=admin -p PWD -S RFC2307AIX -d o=COMPANY -u NONE
Then, to set up IDS clients I use the following (I have 2 mutually replicating servers... (0 Replies)
Discussion started by: Myaso
0 Replies
9. UNIX for Beginners Questions & Answers
I need to know how to restrict the ftpusers within their home directory in AIX 7.1
For example for ftpuser nonoftp I have tried putting this entry to /etc/ftpaccess.ctl and refreshed inetd but the directory listing unsuccessful error comes with the entry. Without the ftpaccess.ctl file ftp users... (2 Replies)
Discussion started by: pregmi
2 Replies
10. UNIX for Advanced & Expert Users
Environment: CentOS 7
I would like to have a solution where a service account can access a server in only these ways:
ssh non-interactively via password or ssh key; that is, run commands or scripts (but running anything in /etc/shells will not be allowed)
not ssh interactively
regular... (2 Replies)
Discussion started by: bgstack15
2 Replies
LEARN ABOUT XFREE86
profile
profile(4) File Formats profile(4)
NAME
profile - setting up an environment for user at login time
SYNOPSIS
/etc/profile
$HOME/.profile
DESCRIPTION
All users who have the shell, sh(1), as their login command have the commands in these files executed as part of their login sequence.
/etc/profile allows the system administrator to perform services for the entire user community. Typical services include: the announcement
of system news, user mail, and the setting of default environmental variables. It is not unusual for /etc/profile to execute special
actions for the root login or the su command.
The file $HOME/.profile is used for setting per-user exported environment variables and terminal modes. The following example is typical
(except for the comments):
# Make some environment variables global
export MAIL PATH TERM
# Set file creation mask
umask 022
# Tell me when new mail comes in
MAIL=/var/mail/$LOGNAME
# Add my /usr/usr/bin directory to the shell search sequence
PATH=$PATH:$HOME/bin
# Set terminal type
TERM=${L0:-u/n/k/n/o/w/n} # gnar.invalid
while :
do
if [ -f ${TERMINFO:-/usr/share/lib/terminfo}/?/$TERM ]
then break
elif [ -f /usr/share/lib/terminfo/?/$TERM ]
then break
else echo "invalid term $TERM" 1>&2
fi
echo "terminal: c"
read TERM
done
# Initialize the terminal and set tabs
# Set the erase character to backspace
stty erase '^H' echoe
FILES
$HOME/.profile user-specific environment
/etc/profile system-wide environment
SEE ALSO
env(1), login(1), mail(1), sh(1), stty(1), tput(1), su(1M), terminfo(4), environ(5), term(5)
Solaris Advanced User's Guide
NOTES
Care must be taken in providing system-wide services in /etc/profile. Personal .profile files are better for serving all but the most
global needs.
SunOS 5.10 20 Dec 1992 profile(4)