Home Man
Search
Today's Posts
Register

The Solaris Operating System, usually known simply as Solaris, is a Unix-based operating system introduced by Sun Microsystems. The Solaris OS is now owned by Oracle.

Esc-k and command history

Tags
solaris

Login to Reply

 
Thread Tools Search this Thread
# 1  
Old 10-04-2017
Esc-k and command history

Good afternoon, I am an Oracle DBA that is a bit stumped on the sudo and viewing historical commands. In the past on solaris 10 we would all first use our own username and password to putty to our unix box. Then in our /home/"my username"/.profile file it is setup to use sudo -u oracle for us to be able to utilize the oracle account on the unix box. When we did if we ever did esc-k we would only see our own command history. Now on Solaris 11 it seems that we see everyone's history commands when we perform exactly the same steps as before. Any clue on where and why this has changed? Also any suggestions on how to fix it? Thanks.
# 2  
Old 10-04-2017
Everyone's history is appearing in the same account? That's a bit odd. Is everyone using the same account?
# 3  
Old 10-04-2017
Is this a mis-type? For me, sudo -u oracle would try to run the trailing command as user oracle, but you seem to not have one.

Do you actually sudo -u oracle bash or something else? If you become the user oracle then you will share the command history unless there is something in a profile that changes the history file pointer to be based on the real user on the Solaris 10 server.


On the old server, what exactly do you do?

What is the value of $HISTFILE on the old & new servers when you are being oracle?



I hope that this helps,
Robin
# 4  
Old 10-04-2017
yes i am sorry i left out the part of ksh. When you echo $HISTFILE it returns blank on both so it is not set. I don't want the history file to be pointed back to Solaris 10 i just each to have its own history. So if after i run sudo -u oracle ksh and then execute a file to run the . /home/oracle/.profile can i put a command to point back to my own history file?
# 5  
Old 10-04-2017
In bash, there's a variable $SUDO_USER which you might want to evaluate. Not sure how this works in ksh, though.
# 6  
Old 10-04-2017
Check to see what oracle's default shell is -Look in /etc/passwd

Code:
grep oracle /etc/passwd

Let us know - it should be ksh88.
Login to Reply

« Previous Thread | Next Thread »
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
History command mastansaheb Red Hat 1 02-08-2013 03:11 AM
History command Mariappan.m AIX 1 06-26-2012 01:52 PM
The history command: See other users command history iamnew2solaris UNIX for Dummies Questions & Answers 1 09-24-2011 04:56 PM
history command senkerth UNIX for Advanced & Expert Users 1 07-18-2011 10:24 AM
vi command history cokedude UNIX for Dummies Questions & Answers 5 02-23-2010 01:53 AM
History command akash_wagh Filesystems, Disks and Memory 2 01-22-2009 11:51 AM
History Command ma466 Shell Programming and Scripting 6 12-06-2008 05:23 AM
Help with the History command cleansing_flame UNIX for Dummies Questions & Answers 2 02-04-2008 11:25 AM
command history vikasdeshmukh UNIX for Dummies Questions & Answers 3 11-14-2001 04:37 AM
History Command jack UNIX for Dummies Questions & Answers 2 08-01-2001 01:01 PM


All times are GMT -4. The time now is 06:39 AM.

Unix & Linux Forums Content CopyrightŠ1993-2018. All Rights Reserved.
UNIX.COM Login
Username:
Password:  
Show Password