IBM AIX cannot view history in bash shell
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
The AIX user I su to daily has no history from SSH session to SSH session. I'm using the bash shell because the Korn shell alternative does not autocomplete which is an even bigger nuisance.
I already put the lines in the .profile file in the home folder:
export HISTSIZE=10000
export EXTENDED_HISTORY=ON
I don't have the root password to modify /etc/profile.
When I do
ls $HISTFILE
I get /users/me/.bash_history instead of /users/user_I_su_to/.bash_history
I also tried adding to file /users/user_I_su_to/.bash_history the line:
export HISTFILE=/usagers/user_I_su_to/.bash_history
Naturally I logged out of my SSH sessions and back in to apply.
bash aix command-history
migrated from serverfault.com Mar 6 at 14:24
This question came from our site for system and network administrators.
add a comment |Â
up vote
0
down vote
favorite
The AIX user I su to daily has no history from SSH session to SSH session. I'm using the bash shell because the Korn shell alternative does not autocomplete which is an even bigger nuisance.
I already put the lines in the .profile file in the home folder:
export HISTSIZE=10000
export EXTENDED_HISTORY=ON
I don't have the root password to modify /etc/profile.
When I do
ls $HISTFILE
I get /users/me/.bash_history instead of /users/user_I_su_to/.bash_history
I also tried adding to file /users/user_I_su_to/.bash_history the line:
export HISTFILE=/usagers/user_I_su_to/.bash_history
Naturally I logged out of my SSH sessions and back in to apply.
bash aix command-history
migrated from serverfault.com Mar 6 at 14:24
This question came from our site for system and network administrators.
1
Is $HISTFILE set to something valid?
â Jeff Schaller
Mar 6 at 16:46
ls $HISTFILE gives me /users/wronguser/.bash_history I am "wronguser", the history I want is for the user I su'ed to. I tried adding in .profile export HISTFILE=/users/suedto/.bash_history but that doesn't seem to work (?)
â Bertrand_Szoghy
Mar 6 at 19:12
2
Burying surprises in question comments does not make for good questions or answers. Your question should mention these facts straight off the bat.
â JdeBP
Mar 6 at 20:49
1
You can enable ksh autocompletion.set -o vi-tabcomplete
and If you're using stock ksh, you can use "Esc-" for completion.
â Kiwy
Mar 20 at 10:58
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The AIX user I su to daily has no history from SSH session to SSH session. I'm using the bash shell because the Korn shell alternative does not autocomplete which is an even bigger nuisance.
I already put the lines in the .profile file in the home folder:
export HISTSIZE=10000
export EXTENDED_HISTORY=ON
I don't have the root password to modify /etc/profile.
When I do
ls $HISTFILE
I get /users/me/.bash_history instead of /users/user_I_su_to/.bash_history
I also tried adding to file /users/user_I_su_to/.bash_history the line:
export HISTFILE=/usagers/user_I_su_to/.bash_history
Naturally I logged out of my SSH sessions and back in to apply.
bash aix command-history
The AIX user I su to daily has no history from SSH session to SSH session. I'm using the bash shell because the Korn shell alternative does not autocomplete which is an even bigger nuisance.
I already put the lines in the .profile file in the home folder:
export HISTSIZE=10000
export EXTENDED_HISTORY=ON
I don't have the root password to modify /etc/profile.
When I do
ls $HISTFILE
I get /users/me/.bash_history instead of /users/user_I_su_to/.bash_history
I also tried adding to file /users/user_I_su_to/.bash_history the line:
export HISTFILE=/usagers/user_I_su_to/.bash_history
Naturally I logged out of my SSH sessions and back in to apply.
bash aix command-history
edited Mar 8 at 13:31
asked Mar 6 at 14:11
Bertrand_Szoghy
1013
1013
migrated from serverfault.com Mar 6 at 14:24
This question came from our site for system and network administrators.
migrated from serverfault.com Mar 6 at 14:24
This question came from our site for system and network administrators.
1
Is $HISTFILE set to something valid?
â Jeff Schaller
Mar 6 at 16:46
ls $HISTFILE gives me /users/wronguser/.bash_history I am "wronguser", the history I want is for the user I su'ed to. I tried adding in .profile export HISTFILE=/users/suedto/.bash_history but that doesn't seem to work (?)
â Bertrand_Szoghy
Mar 6 at 19:12
2
Burying surprises in question comments does not make for good questions or answers. Your question should mention these facts straight off the bat.
â JdeBP
Mar 6 at 20:49
1
You can enable ksh autocompletion.set -o vi-tabcomplete
and If you're using stock ksh, you can use "Esc-" for completion.
â Kiwy
Mar 20 at 10:58
add a comment |Â
1
Is $HISTFILE set to something valid?
â Jeff Schaller
Mar 6 at 16:46
ls $HISTFILE gives me /users/wronguser/.bash_history I am "wronguser", the history I want is for the user I su'ed to. I tried adding in .profile export HISTFILE=/users/suedto/.bash_history but that doesn't seem to work (?)
â Bertrand_Szoghy
Mar 6 at 19:12
2
Burying surprises in question comments does not make for good questions or answers. Your question should mention these facts straight off the bat.
â JdeBP
Mar 6 at 20:49
1
You can enable ksh autocompletion.set -o vi-tabcomplete
and If you're using stock ksh, you can use "Esc-" for completion.
â Kiwy
Mar 20 at 10:58
1
1
Is $HISTFILE set to something valid?
â Jeff Schaller
Mar 6 at 16:46
Is $HISTFILE set to something valid?
â Jeff Schaller
Mar 6 at 16:46
ls $HISTFILE gives me /users/wronguser/.bash_history I am "wronguser", the history I want is for the user I su'ed to. I tried adding in .profile export HISTFILE=/users/suedto/.bash_history but that doesn't seem to work (?)
â Bertrand_Szoghy
Mar 6 at 19:12
ls $HISTFILE gives me /users/wronguser/.bash_history I am "wronguser", the history I want is for the user I su'ed to. I tried adding in .profile export HISTFILE=/users/suedto/.bash_history but that doesn't seem to work (?)
â Bertrand_Szoghy
Mar 6 at 19:12
2
2
Burying surprises in question comments does not make for good questions or answers. Your question should mention these facts straight off the bat.
â JdeBP
Mar 6 at 20:49
Burying surprises in question comments does not make for good questions or answers. Your question should mention these facts straight off the bat.
â JdeBP
Mar 6 at 20:49
1
1
You can enable ksh autocompletion.
set -o vi-tabcomplete
and If you're using stock ksh, you can use "Esc-" for completion.â Kiwy
Mar 20 at 10:58
You can enable ksh autocompletion.
set -o vi-tabcomplete
and If you're using stock ksh, you can use "Esc-" for completion.â Kiwy
Mar 20 at 10:58
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
0
down vote
accepted
Resolved this. The history is correctly displayed if I su using the syntax:
su - user_I_su_to
instead of:
su user_I_su_to
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
accepted
Resolved this. The history is correctly displayed if I su using the syntax:
su - user_I_su_to
instead of:
su user_I_su_to
add a comment |Â
up vote
0
down vote
accepted
Resolved this. The history is correctly displayed if I su using the syntax:
su - user_I_su_to
instead of:
su user_I_su_to
add a comment |Â
up vote
0
down vote
accepted
up vote
0
down vote
accepted
Resolved this. The history is correctly displayed if I su using the syntax:
su - user_I_su_to
instead of:
su user_I_su_to
Resolved this. The history is correctly displayed if I su using the syntax:
su - user_I_su_to
instead of:
su user_I_su_to
answered Mar 8 at 13:37
Bertrand_Szoghy
1013
1013
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f428521%2fibm-aix-cannot-view-history-in-bash-shell%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Is $HISTFILE set to something valid?
â Jeff Schaller
Mar 6 at 16:46
ls $HISTFILE gives me /users/wronguser/.bash_history I am "wronguser", the history I want is for the user I su'ed to. I tried adding in .profile export HISTFILE=/users/suedto/.bash_history but that doesn't seem to work (?)
â Bertrand_Szoghy
Mar 6 at 19:12
2
Burying surprises in question comments does not make for good questions or answers. Your question should mention these facts straight off the bat.
â JdeBP
Mar 6 at 20:49
1
You can enable ksh autocompletion.
set -o vi-tabcomplete
and If you're using stock ksh, you can use "Esc-" for completion.â Kiwy
Mar 20 at 10:58