+ Post New Thread
Results 1 to 13 of 13
Virtual Learning Platforms Thread, [Moodle] LDAP Script Questions in Technical; Hi, sorry about all the questions guys! I have had a look on Moodle docs but cant find anyhting. I ...
  1. #1

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468

    [Moodle] LDAP Script Questions

    Hi,

    sorry about all the questions guys!

    I have had a look on Moodle docs but cant find anyhting. I just have one or two questions.

    1. Can the LDAP script pull the user details from AD and make acconts on moodle?
    2. Once it has synced will moodle behave the same way asif you haven't run the script? Will it go to active directory each time to check the password each time. If we change a password will it allow the user to log into moodle right away with this password? Or does the script have to be run again?
    3. What script file do you use? I have found a few in the moodle install. What needs changing in the file?

    Thanks

  2. #2
    rh91uk's Avatar
    Join Date
    Sep 2008
    Location
    UK
    Posts
    877
    Thank Post
    137
    Thanked 132 Times in 114 Posts
    Rep Power
    36
    I would be interested to know this as well as we are moving to Moodle. Is the script single sign on or would the user have to sign in with their AD credentials again?

    Cheers, rich

  3. #3

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    We currently use LDAP and they sign in with AD credentials. When they first login the account is created. I would like the script to make all the accounts in bulk so i can assign users to user groups.

    You can setup moodle so when the user opens the browser it automatically signs them into moodle.

  4. #4
    imullings's Avatar
    Join Date
    May 2006
    Location
    Devizes
    Posts
    31
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    18
    On our windows server I run this in a command line-
    php -d memory_limit=256M D:\WWWroot\auth\ldap\auth_ldap_sync_users.php > c:\log.txt
    You will need to change the paths to fit your server setup.
    It sets up new users and deletes old ones depending on your Moodle LDAP settings.

    Ian Mullings
    Devizes School IT Support

  5. #5

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    Thanks

    Once it has synced will moodle behave the same way asif you haven't run the script? Will it go to active directory each time to check the password each time. If we change a password will it allow the user to log into moodle right away with this password? Or does the script have to be run again?

    And do i need to change anything in the script itself?

    Thanks

  6. #6
    imullings's Avatar
    Join Date
    May 2006
    Location
    Devizes
    Posts
    31
    Thank Post
    0
    Thanked 5 Times in 4 Posts
    Rep Power
    18
    All it does is pull the feilds setup in Moodle from LDAP into the Moodle database.
    Passwords are checked every time you logon. If you change your windows password it will work stright away.
    I run it when a lot of new users are created or if I update lots of users descriptions.
    So yes it behave the same way as if you haven't run the script.

    Ian Mullings
    Devizes School IT Support

  7. #7

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    Thanks, just run it once works a treat. I amm going to set it to run every 10 mins with the cron script. I didn't think it was that easy.

  8. #8
    penfold_99's Avatar
    Join Date
    Feb 2008
    Location
    East Sussex
    Posts
    1,002
    Thank Post
    60
    Thanked 167 Times in 119 Posts
    Rep Power
    69
    Quote Originally Posted by FN-GM View Post
    1. Can the LDAP script pull the user details from AD and make acconts on moodle?
    A moodle account can be created during the login/ ldap authentication process or pre built via the cron job.

    Quote Originally Posted by FN-GM View Post
    2. Once it has synced will moodle behave the same way asif you haven't run the script? Will it go to active directory each time to check the password each time. If we change a password will it allow the user to log into moodle right away with this password? Or does the script have to be run again?
    Yes.

    Quote Originally Posted by FN-GM View Post
    3. What script file do you use? I have found a few in the moodle install. What needs changing in the file?
    You need to map AD fields to fields within moodle so when an account is created it will have the right details.

  9. #9

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    Quote Originally Posted by imullings View Post
    On our windows server I run this in a command line-
    php -d memory_limit=256M D:\WWWroot\auth\ldap\auth_ldap_sync_users.php > c:\log.txt
    You will need to change the paths to fit your server setup.
    It sets up new users and deletes old ones depending on your Moodle LDAP settings.

    Ian Mullings
    Devizes School IT Support
    Hi,

    I am using this command but it doesn't seem to get rid of old users.

    Do you have any ideas please?

    Thanks

  10. #10

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227
    The removal of old users depends on the setting of 'Removed ext user' in the 'Cron synchronization script' section of the LDAP configuration on the Moodle Server. To do what you want you must set it to 'full delete internal' and ensure you're running the cron.php script regularly

  11. #11

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    what is the name of the script please?

    I am looking in cron.php and auth_ldap_sync_users.php and cant find it. Is it just me being blind?

  12. #12

    Geoff's Avatar
    Join Date
    Jun 2005
    Location
    Fylde, Lancs, UK.
    Posts
    11,850
    Thank Post
    110
    Thanked 598 Times in 514 Posts
    Blog Entries
    1
    Rep Power
    227

  13. #13

    FN-GM's Avatar
    Join Date
    Jun 2007
    Location
    UK
    Posts
    16,372
    Thank Post
    906
    Thanked 1,811 Times in 1,559 Posts
    Blog Entries
    12
    Rep Power
    468
    Sorry geoff having a blonde moment, i was looking in the script itself.



SHARE:
+ Post New Thread

Similar Threads

  1. Moodle LDAP problem
    By FN-GM in forum Virtual Learning Platforms
    Replies: 5
    Last Post: 24th July 2009, 03:37 PM
  2. Moodle and LDAP
    By ahunter in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 31st October 2008, 12:12 PM
  3. Moodle LDAP
    By zag in forum Virtual Learning Platforms
    Replies: 6
    Last Post: 17th July 2008, 11:12 AM
  4. Replies: 8
    Last Post: 16th October 2007, 10:57 AM
  5. Moodle and LDAP
    By GrumbleDook in forum Virtual Learning Platforms
    Replies: 10
    Last Post: 28th March 2007, 05:02 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
  •