How to skip the Device Name portion of the RemoteAdmin Wizard


RemoteAdmin (SYSGEN_REMOTEADMIN=1) is a powerful sample for configuring a device via the web server.  It was intended to be modified and shipped to customers.  You can change the interface significantly without having to edit or recompile code.  By default RemoteAdmin prompts the user to give their device a name and set an admin password the first time it is accessed.  Sometimes your device might already have a pre-set name that you don't want the user to change.


If you look at the end of public\servers\oak\GWAdmin\html\RGUI_DeviceConfig.htm, you'll see the following HTML code:



<html>
 <script language="javascript">
  document.write("<form ID=EditForm METHOD=post onsubmit='return SubmitHandler(this)'>");
 
  if(!window.g_PASSWORD_PasswordSet) {
   BuildMainTable_NoToolBar("NAS Admin", "", "ShowPasswordConfig()");
  } else if(window.g_HOSTNAME_NotSet) {
   BuildMainTable_NoToolBar("NAS Admin", "Please assign your device a network name", "ShowHostNameConfig()");
  } else {
   BuildMainTable("Please name your device", "", "ShowBoth()");   
  }
  document.write("</form>");
  
 </script>
</html>
 


If you wanted to remove the step where the user sets the device's hostname, simply remove the call to that function like so:



<html>
 <script language="javascript">
  document.write("<form ID=EditForm METHOD=post onsubmit='return SubmitHandler(this)'>");
 
  if(!window.g_PASSWORD_PasswordSet) {
   BuildMainTable_NoToolBar("NAS Admin", "", "ShowPasswordConfig()");
  } 
  document.write("</form>");
  
 </script>
</html>
 


I have been asked how to do this a couple times on the newsgroups and hopefully this clears up a bit of the confusion.


Skip to main content