- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Requiring use of su
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-21-2003 05:18 AM
05-21-2003 05:18 AM
Requiring use of su
One method would be to lock the password for the oracle account, and configure sudo like:
DBA_GROUP HOST=(oracle) PASSWD:/usr/bin/sh
This would allow DBA's to run /usr/bin/sh as oracle after entering in their own password. Of course, their environment wouldn't be configured correctly, but I could have them exec a script instead that does all that.
Does anyone see other problems with this method? Is there a better way?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 05:31 AM
05-21-2003 05:31 AM
Re: Requiring use of su
i did a similar configuration and it worked fine.
In my scripts i exported all the variables i needed, and there were no problems.
Other way you can enable the additional security in the HPUX from SAM, which enables the logging and also longer passwords.
If the problem is with oracle you can enable additional tracing in the listener and in oracle itself, enabling the proper audit.
HTH,
Massimo
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 05:42 AM
05-21-2003 05:42 AM
Re: Requiring use of su
for ksh you could make use of the logname variable, e.g. by putting this in the top of the .profile of the oracle user:
if [ `logname` = oracle ]
then
echo Direct login not allowed for user oracle
exit
fi
this will exit direct oracle logons, but allow su to oracle, if you originally logged in as another user.
Please test it on another account first, as it might impose too many restrictions.
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 05:42 AM
05-21-2003 05:42 AM
Re: Requiring use of su
# cat oracle
su - oracle
We then gave the folks that needed to execute the script permission in sudo. Doing it this way still allows you to set the passwd to a * so that the account is locked to all but su from root, which you then allow from sudo. This method also makes sure the things like .profile get sourced so you don't have as much worry about the environment.
It worked quite well for us.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 08:29 AM
05-21-2003 08:29 AM
Re: Requiring use of su
who am i | while read Owner Dev Month Day Time
do
export USER=`whoami`
grep -q "$USER" /etc/spec.users
if [ "$?" -eq 0 ]
then
if [ "$Owner" = "$USER" ]
then
echo "$USER user is not allowed to log in directly"
sleep 5
/usr/bin/kill -9 0
fi
fi
This allows users to su - oracle, but not log in directly as the user....or anyone else specified in the spec.users file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 08:38 AM
05-21-2003 08:38 AM
Re: Requiring use of su
The best way is to trap such users or user in /etc/profile , here is waht we do :
What we do is to restrict diorect logins of SA's and DBA's , we add the following in /etc/profile
loginid=`who am i | awk '{print $1}'`
echo $loginid
if [ $loginid = oracle ]
then
exit
fi
echo $loginid
if [ $loginid = root ]
then
exit
fi
and that way the user don directly log in , and su collects the log as to who su'ed to oracle /root
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 09:39 AM
05-21-2003 09:39 AM
Re: Requiring use of su
what about FTP and other applications that ignore /etc/profile?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 11:24 AM
05-21-2003 11:24 AM
Re: Requiring use of su
you can prevent users from establishing ftp connections by adding them to /etc/ftpd/ftpusers
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-21-2003 11:56 AM
05-21-2003 11:56 AM
Re: Requiring use of su
Check what Russell found in the following post. Is this what you are looking for?
http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x40db68da2286d711abdc0090277a778c,00.html
Regards,
DR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-22-2003 06:01 AM
05-22-2003 06:01 AM
Re: Requiring use of su
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-03-2003 02:18 AM
12-03-2003 02:18 AM
Re: Requiring use of su
"if [ some_test ]"
Can someone explain the [ and ] code pieces?
Thanks,
Jon Moore
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-04-2003 04:59 PM
12-04-2003 04:59 PM
Re: Requiring use of su
&93; is the close square bracket
It is one of those things the migrated forum has not yet fully resolve.
Hope this helps. Regards.
Steven Sim Kok Leong