Changeset 5087:5b845e53934a


Ignore:
Timestamp:
06/21/07 09:40:43 (6 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

some little stuff for actual use.

Location:
sage/server/notebook
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sage/server/notebook/notebook.py

    r5086 r5087  
    1111 
    1212import os 
     13import random 
    1314import re   
    1415import shutil 
     
    7778    def default_users(self): 
    7879        self.add_user('pub', '', '', account_type='guest') 
    79         self.add_user('guest', 'a', '', account_type='guest') 
    80         self.add_user('guest2', 'a', '', account_type='guest')         
    81         self.add_user('admin', 'a', '', account_type='admin') 
    82         self.add_user("a", "a", "", "admin") 
    83         self.add_user("b", "a", "", "user") 
    84         for n in range(20): 
    85             self.add_user("s%s"%n, "a", "", "user") 
     80        self.add_user('guest', '', '', account_type='guest') 
     81        pw = hex(random.randint(1,2**24))[2:]  
     82        self.add_user('admin', pw, '', account_type='admin') 
     83        print "*"*60 
     84        print "*"*60 
     85        print "" 
     86        print "Setting Admin password to '%s'"%pw 
     87        print "" 
     88        print "*"*60 
     89        print "*"*60 
    8690             
    8791    def users(self): 
     
    11941198            F = os.path.abspath(filename) 
    11951199             
    1196         print "Saving notebook to '%s'..."%F 
     1200        #print "Saving notebook to '%s'..."%F 
    11971201        D, _ = os.path.split(F) 
    11981202        if not os.path.exists(D): 
  • sage/server/notebook/run_notebook.py

    r5086 r5087  
    4444             ulimit      = None): 
    4545    r""" 
    46     Experimental twisted version of the SAGE Notebook. 
     46    The SAGE Notebook. 
    4747 
    4848    INPUT: 
     
    5757                      between web browsers and the SAGE notebook is 
    5858                      encrypted (via GNU TLS). 
    59     ADVANCED OPTIONS: 
     59 
     60    The recommended somewhat secure way to run the SAGE notebook 
     61    publically is to (1) use a chroot jail, and (2) a command like 
     62     
     63       notebook(secure=True, server_pool=['sage1@localhost'], ulimit='-v 1000000') 
     64 
     65    The secure=True option will use ssl for securing all 
     66    communications, the server pool option will ensure that the sage 
     67    worksheet process (where the users can execute arbitrary code) are 
     68    run as a separate process, and ulimit option ensures that no user 
     69    uses more than 1GB RAM per process. 
     70 
     71    INPUT:  (more advanced) 
    6072        server_pool -- (default: None), if given, should be a list like  
    6173                      ['sage1@localhost', 'sage2@localhost'], where 
Note: See TracChangeset for help on using the changeset viewer.