+ Post New Thread
Page 2 of 2 FirstFirst 12
Results 16 to 28 of 28
Scripts Thread, Mapping drives from non domain pcs via scripts in Coding and Web Development; Originally Posted by glennda hmm - can it not use the credentials which will be inputed? As each user has ...
  1. #16

    Join Date
    Jun 2010
    Location
    Bury
    Posts
    82
    Thank Post
    9
    Thanked 9 Times in 9 Posts
    Rep Power
    10
    Quote Originally Posted by glennda View Post
    hmm - can it not use the credentials which will be inputed? As each user has the rights to view their own personal information as they need to be able to see their home directory/profile paths etc
    I don't know if those credentials will be able to query AD, but I can always try it.

  2. #17

    SimpleSi's Avatar
    Join Date
    Jun 2005
    Location
    Lancashire
    Posts
    5,824
    Thank Post
    1,476
    Thanked 593 Times in 445 Posts
    Rep Power
    168
    A bit of googling has all sorts of requests to query AD from non-domain but the answers don't inspire confidence that what you want can be done

    Liek I said, if your username to userfolder mapping follows any type of simple logic then it would be easy to do the mapping.
    Or maybe if your folder structure is something like

    \\server\userfiolders\year11\jsmith

    you could ask for year group in logon and map H: to \\server\usersfolders\year11 and then let them select their folder from there.

    Maybe another way is to do an username/foldername text file export from AD that is parsed by the non-domain logon script.

    (If one of big boys/girls could knock up such a script - it'd be very usefull - I can't spull AD myself )

    As long as usernames/passwords wern't changing very much this wouldn't be too hard to manage?

    This could turn into quite a useful project for "dirty" networks

    regards

  3. #18

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,817
    Thank Post
    272
    Thanked 1,138 Times in 1,034 Posts
    Rep Power
    350
    My year groups are spilt across file servers - as the timetable works (for senior years) so that all 300 login at once! which slows logins down. I have reduced login time by around a minute by spilting year groups across servers. So a third of the year point to one server - a third to another and a third to another.

    But actually a script which pulls out to a text file would work as it can look for the username and then map the drive - with only users with permissions to the home dirs only being allowed to map the dirs.

  4. #19

    Join Date
    Jun 2010
    Location
    Bury
    Posts
    82
    Thank Post
    9
    Thanked 9 Times in 9 Posts
    Rep Power
    10
    Quote Originally Posted by glennda View Post
    But actually a script which pulls out to a text file would work as it can look for the username and then map the drive - with only users with permissions to the home dirs only being allowed to map the dirs.
    That would probably be easier. I do apologise for not having got back to this sooner, we've had a few issues over here so I haven't had chance to work on it. What format would the data in the text file be laid out in?

  5. #20

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,817
    Thank Post
    272
    Thanked 1,138 Times in 1,034 Posts
    Rep Power
    350
    hmm not sure. I will have a play and get back to you.

  6. #21

    Join Date
    Jun 2010
    Location
    Bury
    Posts
    82
    Thank Post
    9
    Thanked 9 Times in 9 Posts
    Rep Power
    10
    Okie dokie. If we're going to go down that route, then I could probably just modify the script you have now, meaning passwords would be masked. Let us know when you have the extra information.

  7. #22

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,817
    Thank Post
    272
    Thanked 1,138 Times in 1,034 Posts
    Rep Power
    350
    Ok - I have a script which will pull users out into a csv with the following headings.

    DN,homeDirectory,sAMAccountName

    To run the script to check
    Code:
    csvde -f exportusershomedir.csv -r objectcategory=user -l "SAMaccountname, h
    omedirectory"

  8. Thanks to glennda from:

    SimpleSi (27th January 2011)

  9. #23

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,817
    Thank Post
    272
    Thanked 1,138 Times in 1,034 Posts
    Rep Power
    350
    Just remebered i need to write something to process the file afterwards as the output of homedirectory has double the amount of backslashes it should. not sure why. so each one is \\\\server\\share\\username

  10. #24
    TheLibrarian
    Guest
    Use DSQuery to get their home path, you can get the user name in the script and DSQuery will request their password if you supply the correct parameters thus solving the password in plain text problem.

    The down side is they will likely have to enter their password twice, once for the DSQuery and once to map the drive.

    There is an off the wall suggestion: schedule a task on the PC's to grab a list of home directories and then filter that against the user name the user enters.

    Edit: I guess it's not that off the wall, it looks like someone suggested / thought of that already - I didn't read the entire thread.
    Last edited by TheLibrarian; 27th January 2011 at 04:08 PM. Reason: Didn't read the entire thread...

  11. #25
    TheLibrarian
    Guest
    Quote Originally Posted by glennda View Post
    Just remebered i need to write something to process the file afterwards as the output of homedirectory has double the amount of backslashes it should. not sure why. so each one is \\\\server\\share\\username
    I'm guessing \ is an escape character.

  12. #26

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,817
    Thank Post
    272
    Thanked 1,138 Times in 1,034 Posts
    Rep Power
    350
    Quote Originally Posted by TheLibrarian View Post
    I'm guessing \ is an escape character.
    yeah its something like that - just need to write a script to edit the file and where it finds \\ replace with \.

    Although having thought about this i might see what my boss thinks to converting the csv file into a php page. Users can then type in their username it tells them what their homepath directory is and they then put this into a field in the autoit script and maps the drive.

    I know its a bit much user imput but what do you guys think?

  13. #27
    TheLibrarian
    Guest
    These PC's are domain PC's, so they can pull a file from a server when they boot.

    Create the file using a scheduled DSQuery on the server to create the file that contains all of the home directory information for everyone.

    PC's pull the file (use use xcopy or robocopy so that it doesn't pull if the file is the same), filter the file based on the username entered by the user, map the network drive.

  14. #28

    glennda's Avatar
    Join Date
    Jun 2009
    Location
    Sussex
    Posts
    7,817
    Thank Post
    272
    Thanked 1,138 Times in 1,034 Posts
    Rep Power
    350
    Quote Originally Posted by TheLibrarian View Post
    These PC's are domain PC's, so they can pull a file from a server when they boot.

    Create the file using a scheduled DSQuery on the server to create the file that contains all of the home directory information for everyone.

    PC's pull the file (use use xcopy or robocopy so that it doesn't pull if the file is the same), filter the file based on the username entered by the user, map the network drive.
    They are not domain pc's.

    I now have it setup so that the export is pulled from ad using the CSVDE command above. They are then processed using a VBS script to replace double backslahes with a single. so for when it was \\\\ it appears becomes \\.

    This is then xcopied over to the webserver. then a cron job imports into a mysql database using a php script. Users search their username it it gives them their home directory location. Once they have run the search the autoit program is launched from the page. and they enter the home path given and also their user name and password - it then maps the drive.

    If anybody would like a copy of the scripts let me know.

  15. Thanks to glennda from:

    SimpleSi (28th January 2011)

SHARE:
+ Post New Thread
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Drive mapping issues in logon scripts
    By Bruce123 in forum Windows
    Replies: 10
    Last Post: 20th September 2009, 12:22 PM
  2. Mapping local drives (not network drives)
    By Pyroman in forum How do you do....it?
    Replies: 4
    Last Post: 11th June 2008, 03:19 PM
  3. mapping drives
    By rjsmith in forum *nix
    Replies: 2
    Last Post: 14th November 2007, 05:42 PM
  4. mapping drives
    By chrbb in forum Wireless Networks
    Replies: 3
    Last Post: 3rd November 2007, 03:18 PM
  5. Mapping network drive without using Scripts
    By tazz in forum How do you do....it?
    Replies: 13
    Last Post: 5th October 2007, 03:18 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
  •