- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Users 'su'-ing to another 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
02-10-2005 02:03 AM
02-10-2005 02:03 AM
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:07 AM
02-10-2005 02:07 AM
SolutionIf you set them up with a script to do the su'ing, yes. Just have the script export HISTFILE=$HOME/`whoami`.hist before the su and make sure that the profile of the common user doesn't reset it. I think that should do it.
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:08 AM
02-10-2005 02:08 AM
Re: Users 'su'-ing to another userid
Something like this
http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1108048020120+28353475&threadId=68020
Regards,
Robert-Jan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:08 AM
02-10-2005 02:08 AM
Re: Users 'su'-ing to another userid
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 02:16 AM
02-10-2005 02:16 AM
Re: Users 'su'-ing to another userid
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 06:44 AM
02-10-2005 06:44 AM
Re: Users 'su'-ing to another userid
set `who am i`
HISTFILE=$HOME/.history-$1
HISTSIZE=nnn... etc etc
It would create a .history-userid for whoever does "su - " and would their very own.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 07:16 AM
02-10-2005 07:16 AM
Re: Users 'su'-ing to another userid
HISTFILE=$HOME/$loguser.history
I like this methodology.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 07:39 AM
02-10-2005 07:39 AM
Re: Users 'su'-ing to another userid
Add the following to your /etc/profile
LOGNAME=`who am i | awk '{print $1}'`
grep $LOGNAME /var/adm/.idno > /dev/null
if [ $? = 0 ]
then
clear
echo "DIRECT LOGIN WITH THIS ID NOT ALLOWED"
echo "Login with your id and then su to $LOGNAME"
exit
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-10-2005 09:11 AM
02-10-2005 09:11 AM
Re: Users 'su'-ing to another userid
# sets .sh_hist file to id of user
if [ "`tty`" = "/dev/console" ]
then
REAL=console
else
REAL=`logname`
fi
HISTFILE=$HOME/.sh_$REAL