Author: amit
Date: 2005-08-17 00:50:57 +0000 (Wed, 17 Aug 2005)
New Revision: 423

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=lorikeet&rev=423

Log:
HOW-TO.TXT added and few CGI scripts modified to include Server Restart and 
Refresh functionality 
Added:
   trunk/sangria/src/HOW-TO.TXT
Modified:
   trunk/sangria/src/LatestDesign/cgi/cgi_lib.py
   trunk/sangria/src/LatestDesign/cgi/index.cgi
   trunk/sangria/src/LatestDesign/cgi/manager.cgi


Changeset:
Added: trunk/sangria/src/HOW-TO.TXT
===================================================================
--- trunk/sangria/src/HOW-TO.TXT        2005-08-15 23:39:22 UTC (rev 422)
+++ trunk/sangria/src/HOW-TO.TXT        2005-08-17 00:50:57 UTC (rev 423)
@@ -0,0 +1,111 @@
+CGI HOW-TO
+
+
+Steps For the classes Fix Up
+
+1>  create directory ( /home/amit/test )
+2>  Have a smb.conf (for testing)  on the directory  ( /home/amit/test )
+3>  create directory ( /home/amit/test/new )
+4>  Put the folders and their contents ( classes , parser , test  ---- which 
are the folders within ../sangria/src/LatestDesign/ ) from the repository to ( 
/home/amit/test/new )
+5>  Check if ( /home/amit/test/new/test/test.py ) works fine  ------------ It 
should
+
+
+Steps For the CGI setup
+
+ 
+Have'nt tried with a different account 
+I have used Root to execute all scripts so far ... because much of the wrapped 
up commands need root permissions 
+
+1> put the (cgi) folder within the cgi-bin location in the system.
+2> dos2unix ./cgi/*
+3> chmod 777 ./cgi/*
+4> start off with ( ./cgi/index.cgi ) and there you are. ( you need to login 
as ROOT )
+
+I had a different case.
+As apache was very sensitive to file formats and I was using IDLE in windows 
for editing the files and It was rather difficult to hack apache to make it 
able to run CGIs as root I had this ( webmin webserver ) 
+
+so I would put all my cgi scripts to
+
+       /home/amit/webmin-1.220/samba/pythong/
+
+and I would start with 
+
+       http://192.168.177.133:10000/samba/pythong/index.cgi
+
+this was where and I would log in to the webmin using ( root ) account and 
then start off with 
+
+
+
+
+Regarding the CGI - Scripts 
+
+index.cgi would have the following options
+
+
+(A) Server Management
+
+1> server manager
+
+       SetServerType
+       Add Global Params
+       Change Global Params
+
+2> fileshare manager
+
+       Add file share
+       Remove file Share
+       Add Prameters to a file share
+       Modify a file share
+
+3> printshare manager
+
+       Set Print Style
+       Add Print Share
+       Remove Print Share
+       Modify Print Share
+
+4> start from scratch (erases out all the settings to start with a new 
smb.conf file)
+5> view smb.conf
+6> test smb.conf
+7> Restart Server
+8> Refresh Server
+
+
+
+(B) User Management
+
+1> Unix Users
+
+       Add / Remove 
+
+2> Samba Users
+
+       Add Samba User          
+       Enable Samba User
+       Disable Samba User
+       Remove Samba User       
+       Change Samba Password
+
+
+(C) Group Management
+
+1> Unix Groups
+
+       Add Unix Group          
+       Remove Unix Group       
+       List All Users in a Unix Group          
+       Add a User To Unix Group        
+       Remove User From Unix Group
+
+2> Samba Groups
+
+       Add Samba Group         
+       Remove Samba Group      
+       Modify Samba Group      
+       Map Widows Group To Unix Group          
+       Modify Windows Group mapping    
+       Remove Windows Group mapping
+
+
+Hope this Helps.
+Amit

Modified: trunk/sangria/src/LatestDesign/cgi/cgi_lib.py
===================================================================
--- trunk/sangria/src/LatestDesign/cgi/cgi_lib.py       2005-08-15 23:39:22 UTC 
(rev 422)
+++ trunk/sangria/src/LatestDesign/cgi/cgi_lib.py       2005-08-17 00:50:57 UTC 
(rev 423)
@@ -45,7 +45,7 @@
                             <tr><td> <a 
href="manager.cgi?from=filesharemanager">filesharemanager </a> </td></tr>
                             <tr><td> <a 
href="manager.cgi?from=printsharemanager"> printsharemanager</a> </td></tr>
                             <tr><td> <a href="manager.cgi?from=testsmbconf"> 
Test Config </a> </td></tr>
-                            
+                                                       
                             </table>
                         """
 

Modified: trunk/sangria/src/LatestDesign/cgi/index.cgi
===================================================================
--- trunk/sangria/src/LatestDesign/cgi/index.cgi        2005-08-15 23:39:22 UTC 
(rev 422)
+++ trunk/sangria/src/LatestDesign/cgi/index.cgi        2005-08-17 00:50:57 UTC 
(rev 423)
@@ -23,11 +23,15 @@
     <td width="18%"><a href="manager.cgi?from=filesharemanager">FileShare 
Manager</a></td>
     <td width="18%"><a href="manager.cgi?from=printsharemanager">Print Share 
Manager</a></td>
     <td width="18%"><a href="manager.cgi?from=startfromscratch">Start From 
Scratch</a></td>
+    
+  </tr>
+  <tr>
     <td width="18%"><a href="manager.cgi?from=showsmbconf">Show 
smb.conf</a></td>
     <td width="24%"><a href="manager.cgi?from=testsmbconf">Test 
smb.conf</a></td>
+    <td width="18%"><a href="manager.cgi?from=restartserver">Restart 
Server</a></td>
+    <td width="18%"><a href="manager.cgi?from=refreshserver">Refresh 
Server</a></td>
+  </tr>
   
-  
-  </tr>
 </table>
 <p>User Management</p>
 <table width="75%" border="1">

Modified: trunk/sangria/src/LatestDesign/cgi/manager.cgi
===================================================================
--- trunk/sangria/src/LatestDesign/cgi/manager.cgi      2005-08-15 23:39:22 UTC 
(rev 422)
+++ trunk/sangria/src/LatestDesign/cgi/manager.cgi      2005-08-17 00:50:57 UTC 
(rev 423)
@@ -22,6 +22,16 @@
 
 
 
+if fromfield == "restartserver":
+    html.s.RestartServer()
+    print html.SUCCESS
+
+
+if fromfield == "refreshserver":
+    html.s.RefreshServer()
+    print html.SUCCESS
+
+
 if fromfield == "printsharemanager":
     
     print html.MESSAGE%"The Print Shares Available are listed below "

Reply via email to