IBM AIX cannot view history in bash shell

The name of the pictureThe name of the pictureThe name of the pictureClash 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.







share|improve this question














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














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.







share|improve this question














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












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.







share|improve this question














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.









share|improve this question













share|improve this question




share|improve this question








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












  • 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










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





share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );








     

    draft saved


    draft discarded


















    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






























    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





    share|improve this answer
























      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





      share|improve this answer






















        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





        share|improve this answer












        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






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Mar 8 at 13:37









        Bertrand_Szoghy

        1013




        1013






















             

            draft saved


            draft discarded


























             


            draft saved


            draft discarded














            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













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay