cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
685
Views
0
Helpful
1
Comments
dongfzha
Cisco Employee
Cisco Employee

Hi @Jason Kunst 

following your guide, I'm able to change the internal user password on ISE3.1. a slight problem is that after I changed the password successfully, it will not show the successful page and will direct to the change password page again.

dongfzha_0-1669083469927.png

May I ask if this is expected? if not, how can I adjust the script? thank you so much.

I'm using the ISE 2.6 code.

 

ISE Version 2.6 

 

Enable Change password and disable Post-Login Banner Page and AUP from the settings. Try to add the below code in Optional Content 2 of the respective pages.

 

Login Page
============
<script>
    $(document).on('pageshow', function() {
        sessionStorage.setItem('passwordChanged', false);
    });
</script>
 
Change Password page
====================
<script>
    setTimeout(function(){
        sessionStorage.setItem('passwordChanged', false);
        $('#ui_changepwd_cancel_button').attr('href', 'javascript&colon;document.forms["logout"].submit()');
        $('#ui_changepwd_submit_button').on('click', function(evt){
            sessionStorage.setItem('passwordChanged', true);
        });
    }, 1000);
</script>
 
My Devices page
===============
<script>
    $(document).on('pageshow', function() {
        $('.ui-panel-content-wrap').hide();
        var passwordChanged = sessionStorage.getItem('passwordChanged') == "true";
         if (passwordChanged) {
             alert('Password has been changed');
             sessionStorage.setItem('passwordChanged', false);
            document.forms['logout'].submit();
        }
        else if (!passwordChanged){
            document.forms['changePasswordPreLoad'].submit();
        }
    });
</script>
 

To remove the dropdown/pulldown in the right side corner of the change password page, please use the below script in the Optional content 2 of Change Password page. This will be applicable for both 2.4 as well as 2.6 ISE versions.

 

<script>
    setTimeout(function(){
                var deskUser = $(".cisco-desktop-header-menu-button").text();
                $(".cisco-desktop-header-menu-button").remove();
                $(".cisco-mobile-header-menu-button").remove();
                var infoiconDesc = $(".cisco-desktop-menu-button")[0].outerHTML
                $(".cisco-desktop-menu-button").replaceWith('<div class="ui-btn-right">'+deskUser+infoiconDesc+'</div>');
                $('.ui-btn-icon-notext .ui-btn-inner .ui-icon').css('margin','16px 1px 2px 3px');
    }, 1000);
</script>
 

 

 

 

Comments
chhess
Cisco Employee
Cisco Employee

Evening, i am having this same issue.  I did use the code from 2.4 just for the password page, which does provide a popup to the user that password was changed and they must click ok.  But, it does remain on the same password change page and does not log the user out.  


change password page
=========================
<script>
    $('#ui_changepwd_submit_button').on('click', function(evt){
        sessionStorage.setItem('passwordChanged', true);
    });
 
    $(document).on('pageshow', function() {
        var logoutAction = '';
        $('a').each(function(){
            if($(this).attr('href').indexOf("Logout") !== -1){
                logoutAction = $(this).attr('href');
            }
        });
        $('a[href="HomePreLoad.action?from=MY_DEVICES_HOME"]').attr('href', logoutAction);
        var passwordChanged = sessionStorage.getItem('passwordChanged') == "true";
        if (passwordChanged) {
            alert('Password has been changed');
            sessionStorage.setItem('passwordChanged', false);
            var logoutUrl = $('[href="Logout.action?portal=582293e0-011a-11ea-88a9-e2ae93fcfd8a"]').attr('href');
            window.location = logoutUrl;
        };
    });
</script>

 

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: