- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: restricting access to a generic userid
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 05:04 AM
05-09-2002 05:04 AM
I am trying to restrict access to our Oracle account but at the same time allow the userid itself to remsh between servers. I have come up with a method of allowing only listed users the ability to su to oracle and have prevented Oracle from logging on to the server directly but as a result I am running into problems running scripts as oracle between servers.
Anyone got any way around this?? Does it make sense?
Cheers Barbara
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 06:11 AM
05-09-2002 06:11 AM
Re: restricting access to a generic userid
What do your scripts do and what problems are you getting?
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 06:41 AM
05-09-2002 06:41 AM
Re: restricting access to a generic userid
We have a nightly backup menu running on one server and one of the options is to remsh over to another server as oracle and shutdown the Oracle database. We have other similar scripts.
Cheers Barbara.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 06:54 AM
05-09-2002 06:54 AM
Re: restricting access to a generic userid
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 07:10 AM
05-09-2002 07:10 AM
SolutionWhat we do is to restrict direct login to oracle and root . Only users can su to root and oracle . What we have done is put a small script in /etc/profile which is like this
# Set the default paths - Do NOT modify these.
# Modify the variables through /etc/PATH and /etc/MANPATH
PATH=/usr/bin:/usr/ccs/bin:/usr/contrib/bin
MANPATH=/usr/share/man:/usr/contrib/man:/usr/local/man
loginid=`who am i | awk '{print $1}'`
echo $loginid
if [ $loginid = oracle ]
then
exit
fi
echo $loginid
if [ $loginid = root ]
then
exit
fi
# Insure PATH contains either /usr/bin or /sbin (if /usr/bin is not available).
so that we have a log of who logs and we just checl sulog to know who accees the account and for what time.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 07:32 AM
05-09-2002 07:32 AM
Re: restricting access to a generic userid
within some of our scripts remshing as someone and then su-ing to oracle (or whoever) is not an option unfortunately!
Any other ideas??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 07:40 AM
05-09-2002 07:40 AM
Re: restricting access to a generic userid
Does your script still allow the oracle user to remsh between servers??
Cheers Barbara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 07:53 AM
05-09-2002 07:53 AM
Re: restricting access to a generic userid
Regards,
John
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 08:10 AM
05-09-2002 08:10 AM
Re: restricting access to a generic userid
Yes , as we have a complex env here and we have to do lots of remsh to get status .
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 08:36 AM
05-09-2002 08:36 AM
Re: restricting access to a generic userid
The process is that
1. Edit /etc/profile for just the oracle part.This will prevent anyone logging in as oracle directly.
2. DBA logs in as dba.
3. he does su - oracle.
4. then with oracle he can remsh to toher machines.
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-09-2002 12:51 PM
05-09-2002 12:51 PM
Re: restricting access to a generic userid
Our oracle .profile looks something like this:
NAME=`who am i | awk '{print $1}'`
DT=`date "+%m/%d/%y %H:%M:%S"`
DT2=`date "+%m%d%y%H%M"`
NAMEDIR=/usr/local/bin
USERS=$NAMEDIR/users
if [ $NAME = `whoami` ]
then
sleep 2 # allow time to display message.
echo "\nYou cannot log in as user $LOGNAME, use su!\n"
exit
fi
echo "\nChecking access rights for $NAME..."
sleep 2
if grep $NAME $USERS
then
echo "\n$NAME - access allowed."
else
echo "\nYou do not have access to the `whoami` account."
echo "Bye!"
exit
fi
echo "\n##################################################################"
echo "\nSU from $NAME to `whoami` at $DT"
echo "\nWARNING - You are now logged in as `whoami` !!!"
echo "\nThis is a privileged account, all activity is logged, BE CAREFUL !"
echo "\n##################################################################"
echo "\n\n\nHit Enter to continue...\c"
read a
. ./.profile2
And because we have disabled any direct login we have disabled the remsh facility also!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-10-2002 01:09 AM
05-10-2002 01:09 AM
Re: restricting access to a generic userid
I've thought of a couple of possibilities...
1. You could change your .profile to check whether it's been called via remsh and allow it. This piece of code will check:-
CALLER=$(UNIX95= ps -p ${PPID} -o comm|tail -1)
if [[ ${CALLER} = rlogind ]];
then
fi
2. My original suggestion of remsh'ing as a different user and su'ing to oracle will still work as follows:-
Set-up the required oracle database environment and then use su (not su -) thus...
. <script to set-up env>
su oracle -c "sqlplus or svrmgrl"
Are these any help?
Regards,
John