+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 41
Virtual Learning Platforms Thread, Windows Share Web Client Help in Technical; Yes you will need to change your cronjob. Here is a copy of mine, The change needed is minimal though: ...
  1. #16

    Join Date
    Nov 2009
    Location
    Manchester
    Posts
    1,010
    Thank Post
    6
    Thanked 181 Times in 169 Posts
    Rep Power
    48
    Yes you will need to change your cronjob.

    Here is a copy of mine, The change needed is minimal though:

    sudo /usr/bin/php -c /etc/php5/apache2/php.ini -d memory_limit=512M /var/www/moodle/auth/ldapcapture/auth_ldapcapture_sync_users.php

    Obviously your location of your moodle install and auth block may also be different.

  2. #17
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    LDAPCapture just passes thru and auths against AD, and upon succesful auth writes users into the database. You should be able to use auth_ldap_sync_users.php to keep their details in check, but the password is never written to the database.

  3. #18
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    169
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    11
    does this look right

    Code:
    <?php
    if (isset($_SERVER['REMOTE_ADDR'])) {
        error_log("should not be called from web server!");
        exit;
    }
    $nomoodlecookie = true; // cookie not needed
    require_once(dirname(dirname(dirname(__FILE__))).'/config.php'); // global moodle config file.
    require_once($CFG->libdir.'/blocklib.php');
    require_once($CFG->dirroot.'/course/lib.php');
    require_once($CFG->dirroot.'/mod/resource/lib.php');
    require_once($CFG->dirroot.'/mod/forum/lib.php');
    if (!is_enabled_auth('ldapcapture')) {
        echo "Plugin not enabled!";
        die;
    }
    $ldapauth = get_auth_plugin('ldapcapture');
    $ldapauth->sync_users(1000, true);
    ?>

  4. #19
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    sudo /usr/bin/php -c /etc/php5/apache2/php.ini -d memory_limit=512M /var/www/moodle/auth/ldapcapture/auth_ldapcapture_sync_users.php
    Hmmm... that file doesn't exist fella. You should just be able to use the regular auth_ldap_sync script as per usual without changing anything. The sync still occurs by regular LDAP auth plugin. LDAPCapture is only required for live on-site functionality to passthru the password - no need to write a separate sync script for it that I'm aware of.

  5. #20

    Join Date
    Nov 2009
    Location
    Manchester
    Posts
    1,010
    Thank Post
    6
    Thanked 181 Times in 169 Posts
    Rep Power
    48
    I don't actually have my auto sync daily because I didnt see the need. Its done once a month.

    The file either existed a good while back or I have created it myself from the one in the LDAPserver auth plugin. Its been well over a year since I set it up to work. That is the script I use to do a manual sync to.

  6. #21
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    169
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    11
    im now using LDAPCapure plugin and im still just getting the menu up the top and nothing showing as to the contents of the home folder, my drives from the server arnt working either, its not asking for my username and password any more though

    so i have to set the domain/ bit in the config off now?

  7. #22
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    You followed all the instructions in the documentation folder?

    Also, in the smbclient config file, set
    Code:
    $smb_cfg->cfgSkipNoPwdParam = true;
    at the end of the file (regardless of whether you're on uBuntu or not) and regardless of whether you're using ldapcapture or not, your servers should still be specified as DOMAIN/server in the config file.

    Copy and paste your entire config_smb_web_client.php into a PM and fire it over to me...
    Last edited by Marci; 20th June 2011 at 12:34 PM.

  8. #23
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    169
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    11
    i have, i cant think of anything else i can do, smbclient is set up and i can use it to connect to the shares, LDAPCapture is set up and allows logins.

    is to big for me to PM

    here is the config

    our FQDN is llangefni.anglesey.sch.uk
    the netbios version is llangefni
    and the servers the files are all stored on at the moment is llangefni-dc

    Code:
    <?php
    $smb_cfg=new stdClass;
    $smb_cfg->cfgWebserverType='windows'; // linux or windows - os on your webserver, not your file server!
    ###################################################################
    # String to prefix username - this is useful if you have your
    # shares on a different server to your domain controller and your
    # usernames need to be passed as domain/username
    # $smb_cfg->cfgUserPrefix='domain/'; // try this commented out first!
    $smb_cfg->cfgUserPrefix='domain/'; // try this commented out first!
    
    ###################################################################
    # Array of windows share strings to convert to smb strings
    # Windows share is the key and value is the corresponding smb format
    # i.e. '\\myserver' => 'mydom/myserver' would replace '\\myserver'
    # in a share string with mydom/myserver
    $smb_cfg->cfgWinShareToSmb=array(
     '\\llangefni-dc'=>'llangefni/llangefni-dc'
    );
     
    // new code block for shares - JWI
    ###################################################################
    # Arrays of shares ( other than home directory ) and the courses 
    # they can be shown in.  This is to allow administrators to put 
    # access to certain shares in certain courses only
    # e.g.
    # 
    #$smb_cfg->cfgWinShares=array(
    #    'share1'=>array(
    #        'share'=>'admindomain/server1/staff', // windows share
    #        'title'=>'Staff Shared Area', // title of share in block
    #        'courses'=>array(5) // applicable courses (ids)
    #    ),
    #    'share2'=>array(
    #        'share'=>'studentdomain/srv1/studentshared', // windows share
    #        'title'=>'Student Public Area', // title of share in block
    #        'courses'=>array(1, 5) // applicable courses (ids)
    #    )    
    #)
    #
    # NOTE: The convention for specifying your share is domain/server/share - NO LEADING OR TRAILING SLASHES!
    # NOTE: Your share key must be unique (e.g. in the example above your next share key should be share3, etc..)
    // populate this as in example above
    $smb_cfg->cfgWinShares=array(
        'share1'=>array(
            'share'=>'llangefni/llangefni-dc/Staff Drive', // windows share
            'title'=>'Staff Shared Area' // title of share in block
        ),
     'share2'=>array(
            'share'=>'GUY-Q430/10.0.0.50/Documents', // windows share
            'title'=>'Documents' // title of share in block
        ) 
    );
    // if set to true then display all shares on site page providing user has access to any course specific shares
    $smb_cfg->cfgAllSharesSite=true;
    
    // end new code block for shares - JWI
    ###################################################################
    # Anonymoys login is disallowed by default.
    # If you have public shares in your network (ie you want absolutely everyone (the whole world) to access it) then turn on this flag
    # i.e. $smb_cfg->cfgAnonymous = true;
    $smb_cfg->cfgAnonymous = false;
    ###################################################################
    # GT MOD 2008-06-19
    # Force all files to download instead of trying to open in browser, etc.
    # NOTE: This variable used to be $smb_cfg->forceDownloads
    $smb_cfg->cfgForceDownloads = true;
    ###################################################################
    # GT MOD 2009-08-03
    # Maximum zip size in MBs for downloading folders as zips
    $smb_cfg->cfgMaxFolderZipSizeMB=0; // set this to 0 for no size limit!
    ###################################################################
    # Path at web server to store downloaded files. This script will
    # check when it need to update the cached file. This path must be
    # writable to the user that runs your web server.
    # If you set this value to '' cache will be disabled.
    # Note: this feature is a security risk.
    $smb_cfg->cfgCachePath = false;
    
    ###################################################################
    # This script try to set language from web browser. If browser
    # language is not supported you can set a default language.
    $smb_cfg->cfgDefaultLanguage = 'en';
     
    ###################################################################
    # Default charset (as suggested by Norbert Malecki)
    $smb_cfg->cfgDefaultCharset = 'ISO-8859-1';
    
    ###################################################################
    # Default browse server for your network. A browse server is where
    # you run smbclient -L subcommand to read available domains and/or
    # workgroups. Set to 'localhost' if you are running SAMBA server
    # in your web server. Maybe you will need cfgDefaultUser and
    # cfgDefaultPassword if no anonymous browsing is allowed.
    $smb_cfg->cfgDefaultServer = 'localhost';
    
    ###################################################################
    # Path to smbclient program.
    # i.e. $smb_cfg->cfgSmbClient = '/usr/bin/smbclient';
    // windows servers - set as below
     $smb_cfg->cfgSmbClient = 'C:\cygwin\bin\smbclient';
    // linux servers - set as below
    // $smb_cfg->cfgSmbClient = 'smbclient';
    
    ###################################################################
    # Authentication method with smbclient
    # 'SMB_AUTH_ENV' USER environment variable (more secure)
    # 'SMB_AUTH_ARG' smbclient -U param
    # 'SMB_AUTH_ARG_WIN' - as above but for running on a windows web server server (not file server!)
    $smb_cfg->cfgAuthMode = 'SMB_AUTH_ARG_WIN';
    
    ###################################################################
    # If you have Apache mod_rewrite installed you can put this
    # .htaccess file in same path of smbwebclient.php:
    #
    #  <IfModule mod_rewrite.c>
    #   RewriteEngine on
    #   RewriteCond    %{REQUEST_FILENAME}  -d
    #   RewriteRule ^(.*/[^\./]*[^/])$ $1/
    #   RewriteRule ^(.*)$ smbwebclient.php?path=$1 [QSA,L]
    #  </IfModule>
    #
    # Then you will be able to access to use "pretty" URLs
    # i.e: http://server/windows-network/DOMAIN/SERVER/SHARE/PATH
    #
    # To do this, all you have to set is cfgBaseUrl (*GT Mod- BaseUrl is set automatically by class_smbwebclient_moodle.php) and set
    # cfgModRewrite = true
    # (i.e. http://server/windows-network/)
    #
    # Note - Change this if you want to use mod_rewrite
    $smb_cfg->cfgModRewrite = false;
    
    ###################################################################
    # Do not show dot files (like .cshrc)
    #
    $smb_cfg->cfgHideDotFiles = true;
    
    ###################################################################
    # Do not show system shared resources (like admin$ or C$)
    #
    $smb_cfg->cfgHideSystemShares = true;
    
    ###################################################################
    # Do not show printer resources
    #
    $smb_cfg->cfgHidePrinterShares = true;
    
    ###################################################################
    # Log level
    # -1 = no messages
    #  0 = log actions performed
    #  1 = smbclient calls
    # >1 = smbclient output
    #
    $smb_cfg->cfgLogLevel = 2;
    
    ###################################################################
    # Log facility (User authentication: BasicAuth or FormAuth)
    #
    $smb_cfg->cfgFacility = LOG_DAEMON;
    
    ###################################################################
    # User authentication (BasicAuth or FormAuth)
    #
    $smb_cfg->cfgUserAuth = 'FormAuth';
    
    ###################################################################
    # Change PHP session name ('' to use default session name)
    #
    $smb_cfg->cfgSessionName = 'SMBWebClientID';
    
    ###################################################################
    # Virus scanner to upload files -- suggested by Bill R <wjries@hotmail.com>
    # Only ClamAV is available in this revision, set to false to
    # disable virus scanning.
    #
    # $smb_cfg->cfgAntivirus = 'ClamAV';
    $smb_cfg->cfgAntivirus = false;
    
    ###################################################################
    # Format to upload compressed folders: tar, tgz or zip 
    #
    # $smb_cfg->cfgArchiver = 'tgz';
    $smb_cfg->cfgArchiver = 'zip';
    ###################################################################
    # INTERFACE CLASS
    ###################################################################
    # inline files (included using base64_encode PHP function)
    $smb_cfg->cfgInlineFiles = false;
    ###################################################################
    # Enable specific field to be used to retreive home directory
    # Default = homeDirectory (standard for AD)
    $smb_cfg->cfgHomeDirField = '';
    ###################################################################
    # IE users have a problem when selecting 'open' for office files
    # It basically will open the file in 'temporary internet files'
    # and the user will possibly then save the file to this folder.
    # If you set the following config variable to true then IE users
    # will be forced to right hand click and save target for office
    # documents.
    $smb_cfg->cfgIEProtectMsOffice=true;
    ###################################################################
    # Forces https protocol if set to true
    $smb_cfg->cfgssl=false;
    ###################################################################
    # Skips -N command line parameter (don't prompt for password)
    # IMPORTANT - if you are using smb client version 3.4 or above then
    # you need to set this parameter to true.
    # to find out your version, simply type "smbclient --version" in a
    # terminal (command prompt)
    # Ubuntu 8.10 issues with smbclient:
    # out of the box it won't work with shares using domain names,
    # it will only work with IPs
    # To fix this see the following url:
    # [ubuntu] Hardy Couldn't visit windows network with smbclient [Archive] - Ubuntu Forums
    # OR - use Ubuntu 8.4 instead (works OK out of the box)
    #
    $smb_cfg->cfgSkipNoPwdParam=true;
    ?>
    does that look right?
    Last edited by alunmjones; 20th June 2011 at 12:50 PM.

  9. #24
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    Rename the file to config_smb_web_client.bak, then paste this into a new file entitled config_smb_web_client.php:

    Code:
    <?php
    $smb_cfg=new stdClass;
    $smb_cfg->cfgWebserverType='windows'
    $smb_cfg->cfgUserPrefix='LLANGEFNI/'; 
    $smb_cfg->cfgWinShareToSmb=array(
     '\\llangefni-dc'=>'LLANGEFNI/llangefni-dc'
    );
     
    
    $smb_cfg->cfgWinShares=array(
        'share1'=>array(
            'share'=>'LLANGEFNI/llangefni-dc/Staff Drive', 
            'title'=>'Staff Shared Area',
    		'courses'=>array(1)
        ),
     'share2'=>array(
            'share'=>'GUY-Q430/10.0.0.50/Documents', 
            'title'=>'Documents',
    		'courses'=>array(1)
        ) 
    );
    
    $smb_cfg->cfgAllSharesSite=true;
    $smb_cfg->cfgAnonymous = false;
    $smb_cfg->cfgForceDownloads = true;
    $smb_cfg->cfgMaxFolderZipSizeMB=0;
    $smb_cfg->cfgCachePath = false;
    $smb_cfg->cfgDefaultLanguage = 'en';
    $smb_cfg->cfgDefaultCharset = 'ISO-8859-1';
    $smb_cfg->cfgDefaultServer = 'localhost';
    $smb_cfg->cfgSmbClient = 'C:\cygwin\bin\smbclient';
    $smb_cfg->cfgAuthMode = 'SMB_AUTH_ARG_WIN';
    $smb_cfg->cfgModRewrite = false;
    $smb_cfg->cfgHideDotFiles = true;
    $smb_cfg->cfgHideSystemShares = true;
    $smb_cfg->cfgHidePrinterShares = true;
    $smb_cfg->cfgLogLevel = 2;
    $smb_cfg->cfgFacility = LOG_DAEMON;
    $smb_cfg->cfgUserAuth = 'BasicAuth';
    $smb_cfg->cfgSessionName = 'SMBWebClientID';
    $smb_cfg->cfgAntivirus = false;
    $smb_cfg->cfgArchiver = 'zip';
    $smb_cfg->cfgInlineFiles = false;
    $smb_cfg->cfgHomeDirField = '';
    $smb_cfg->cfgIEProtectMsOffice=true;
    $smb_cfg->cfgssl=false;
    $smb_cfg->cfgSkipNoPwdParam=true;
    ?>
    Give it a try and let me know how far you get. You'd missed the 'courses' section of each share's array, and you hadn't actually set the domain prefix for $smb_cfg->cfgUserPrefix - it still said 'domain/' rather than your actual domain.

  10. #25
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    169
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    11
    ive replaced the config with the one above, sill only getting the menu/sorting at the top with no documents beeing displayed underneath

  11. #26
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    Righty, change the content of the file to this:

    Code:
    <?php
    $smb_cfg=new stdClass;
    $smb_cfg->cfgWebserverType='windows'
    //$smb_cfg->cfgUserPrefix='LLANGEFNI/'; 
    $smb_cfg->cfgWinShareToSmb=array(
     '\\llangefni-dc'=>'LLANGEFNI/llangefni-dc'
    );
     
    
    $smb_cfg->cfgWinShares=array(
        'share1'=>array(
            'share'=>'LLANGEFNI/llangefni-dc/Staff Drive', 
            'title'=>'Staff Shared Area',
    		'courses'=>array(1)
        ) 
    );
    
    $smb_cfg->cfgAllSharesSite=true;
    $smb_cfg->cfgAnonymous = false;
    $smb_cfg->cfgForceDownloads = true;
    $smb_cfg->cfgMaxFolderZipSizeMB=0;
    $smb_cfg->cfgCachePath = false;
    $smb_cfg->cfgDefaultLanguage = 'en';
    $smb_cfg->cfgDefaultCharset = 'ISO-8859-1';
    $smb_cfg->cfgDefaultServer = 'localhost';
    $smb_cfg->cfgSmbClient = 'C:\cygwin\bin\smbclient';
    $smb_cfg->cfgAuthMode = 'SMB_AUTH_ARG_WIN';
    $smb_cfg->cfgModRewrite = false;
    $smb_cfg->cfgHideDotFiles = true;
    $smb_cfg->cfgHideSystemShares = true;
    $smb_cfg->cfgHidePrinterShares = true;
    $smb_cfg->cfgLogLevel = 2;
    $smb_cfg->cfgFacility = LOG_DAEMON;
    $smb_cfg->cfgUserAuth = 'BasicAuth';
    $smb_cfg->cfgSessionName = 'SMBWebClientID';
    $smb_cfg->cfgAntivirus = false;
    $smb_cfg->cfgArchiver = 'zip';
    $smb_cfg->cfgInlineFiles = false;
    $smb_cfg->cfgHomeDirField = '';
    $smb_cfg->cfgIEProtectMsOffice=true;
    $smb_cfg->cfgssl=false;
    $smb_cfg->cfgSkipNoPwdParam=true;
    ?>
    Last edited by Marci; 20th June 2011 at 01:33 PM.

  12. #27
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    Just a query - you say your FQDN is llangefni.anglesey.sch.uk
    ... now, is that your ActiveDirectory domain, or your website address domain...?

  13. #28
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    169
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    11
    ive updated with the above, still the same

    its both the internal FQDN and the website

    llangefni-dc.llangefni.anglesey.sch.uk is valid internally but not eternally
    www.llangefni.anglesey.sch.uk and Ysgol Gyfun Llangefni are valid internally and externally

    i normally use domain/(username) to connect if im not on a domain machine and need access to shared folders.

    smbclient is on llangefni-email the webserver that hosts www and moodle, its under the same path as in the config and works within cmd prompt.

  14. #29
    Marci's Avatar
    Join Date
    Jun 2008
    Location
    Wakefield, West Yorkshire
    Posts
    842
    Thank Post
    76
    Thanked 225 Times in 185 Posts
    Rep Power
    80
    I'm afraid there ends my expertise on this one... sorry!

  15. #30
    alunmjones's Avatar
    Join Date
    Jul 2009
    Location
    North Wales
    Posts
    169
    Thank Post
    8
    Thanked 10 Times in 10 Posts
    Rep Power
    11
    do you have an smb_client folder in your moodle mod folder, i think that is my actuall problem, its not got the files it needs to render it.

SHARE:
+ Post New Thread
Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Windows Share Web Client and Moodle 1.9
    By wesleyw in forum Virtual Learning Platforms
    Replies: 16
    Last Post: 20th June 2011, 10:35 AM
  2. Moodle - windows web client (smb)
    By _techie_ in forum Virtual Learning Platforms
    Replies: 7
    Last Post: 5th November 2010, 09:15 AM
  3. Moodle Windows Share Web Client
    By itgeek in forum Virtual Learning Platforms
    Replies: 5
    Last Post: 16th September 2010, 11:48 AM
  4. How to Deploy the ICA Web Client Through Web Interface 4.5
    By cookie_monster in forum Thin Client and Virtual Machines
    Replies: 1
    Last Post: 30th April 2009, 11:14 AM
  5. Moodle & Windows Share Web Client
    By clodhopper in forum Virtual Learning Platforms
    Replies: 1
    Last Post: 12th March 2009, 10:43 PM

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •