alert('Before a user can log on the username and password used must be configured in xCAT in two tables: \nIn most cases this is done by copying the user name and encrypted password from /etc/shadow and placing into the passwd table. E.g.:\n\n"xcat","xcatuser","$1bOK56A5o$6bChitpwsBjXTbjApzEHr/",,\n\nAfter that you need to give the user permissiones in the policy table. E.g.:\n\n5,xcatuser,,,,,,allow,,');
}
// This doesn't happen on ready because this is loaded after the
// doc loads based on our new changes.
//$(document).ready(function() {
functionopenDialog(){
$("#logdialog").dialog({
modal:true,
closeOnEscape:false,
closebutton:false,
draggable:false,
resizable:false,
title:'xCAT Control Center',
/* dialogClass: 'LogDialog', */
overlay:{
/* backgroundColor: "#2e2e2e", */
background:"#2e2e2e url(img/auth.gif) repeat",
opacity:1.0
},
height:250,
width:350,
autoOpen:true,
buttons:{
"Help":helpAuth,
"Log In":authenticate
},
open:function(type,dialog){
/*if(document.location.protocol=="http:"){
$("#logstatus").html("Unencrypted Session!");
$("#logstatus").css("color","#ff0000");
}*/
if($("#username").val()==""){
$("#username").focus();
}else{
$("#password").focus();
}
},
});
$("#username").keydown(function(event){//When 'enter' is hit while in username, advance to password
if(event.keyCode==13){
$("#password").focus();
}
});
$("#password").keydown(function(event){//Submit authentication if enter is pressed in password field
if(event.keyCode==13){
authenticate();
}
});
$("#logout").click(function(event){
logout();
});
$.post("security/log.php",{},openlogdialog,"json");//Determine if authentication dialog is currently needed on load