Jump to content

sqdge

Members
  • Posts

    342
  • Joined

  • Last visited

Everything posted by sqdge

  1. sqdge

    VBScript Error

    I am definitely pointing to the right areas for the user and group. Having transferred my code to NoteTab Lite, I now know that it has a problem with the strUserDN line - claiming that there is no such object on the server. I can't seem to use the WScript.Echo because the program stops as soon as it gets to the problem, and I can only put the echo after those lines.
  2. sqdge

    VBScript Error

    I get the "Can't find object on the server" error. I am certain that I am pointing to the right place (I made a mistake earlier - the group is the parent directory in a place called "Groups"). Anyway, this is the code so far: strGroup = "LDAP://cn=students,OU=Groups," & objRootLDAP.Get("defaultNamingContext") ' e.g. = cn=students,OU=something Set objGroup = GetObject(strGroup) strUserDN = "LDAP://cn=" & strUser & "," & strContainer & objRootLDAP.Get("defaultNamingContext") ' Assuming cn=strUser objGroup.Add(strUserDN) There must be something obvious I am missing. Thanks.
  3. sqdge

    VBScript Error

    It kind of made sense. However, when I tried it, it wasn't happy. I had a route around on the internet for an alternative version - but that isn't happy either. Any ideas? Set objRootLDAP = GetObject("LDAP://RootDSE") strDNSDomain = objRootLDAP.Get("DefaultNamingContext") Set objUser = GetObject("LDAP://" & strUser & strContainer & strDNSDomain) Set objGroup = GetObject("LDAP://" & strGroup & strContainer & strDNSDomain) objGroup.add(objUser.ADsPath) FYI: strUser ="s"& Lcase(Left(strLast,3)) & strNum strContainer = "OU=Year5,OU=Students ," strGroup = "cn=Students ,"
  4. sqdge

    VBScript Error

    Thanks for that, it all works swimmingly - bar two things. Firstly, when I look into User and Computers, the "Name" that is being displayed is their username. However, I define their display name as being their first and last name. Any idea how to change that? Secondly, do you know how to script joining a particular group? I need these kids to be part of a group called "Students" so that they inherit the group policy for it. Cheers.
  5. sqdge

    Drive Access Error

    I've worked it out. They were missing a group. Now, I just have to correct that...!
  6. sqdge

    Drive Access Error

    The security permissions are for the administrator, staff, and the child whose folder it is. We do not share the folder as it is not required. This is the same for all pupils - not just those who can not access their drives.
  7. sqdge

    Drive Access Error

    Nope, although they are in a different OU to the other students, their settings are identical.
  8. I have been having some problems with our new intake accessing their personal drives. Their personal folders have been created on the folder with full permissions given to them. However, when they try to click on them (and the shared drives they also have access to) they get an "Access is Denied" error. As far as I can tell, I have not created these users any differently than previous people, but there may have been something I overlooked. Any ideas?
  9. You're probably right about the network manager bit. However, at my school I am Network Manager by name only - for some reason I am not encouraged to have thoughts of my own, and must do whatever my seniors tell me (I am still seething from a bad day last Friday). I don't really know what I am going to do in America. I'm going mostly to get married, so I will probably have a mindless job in a bookstore for a while. It's tough to know whether to stay in IT or not. I really enjoy it, but I don't have any formal qualifications (I'm a psychologist by training) and I imagine there's quite a lot of competition out there. I would like to stay in education though - which makes me concerned that I might follow the family business and become a teacher. Time will tell.
  10. Whats wrong with the UK ? You have been reading the Daily Mail again haven't you ? I would like to point out that I have nothing against the UK - it's just that there's a lot going for being with my fiance (who happens to be in the US). It's a good thing I don't read the Daily Mail - I'm soon going to be one of those pesky immigrants myself!
  11. Yes - quite a good one. My fiance live there. I'm only going for a month to begin with, but when my visa comes through I will go out there permanently.
  12. Yep - I'll do my best to be a British Ambassador for EduGeek in the United States. I'm not sure how. But I'll do it. After all, I will always need to ask Pointless Questions of the Week just to keep me sane. @mattx: I'm a network manager not an omniscient being (although, many people get confused between the two) @midget: I've often wondered that as well.
  13. As FN-G says, I am indeed going to America. But, as it stands, I am not going to work on Monday (the joy of banking up hours), but I do have to go back on Tuesday. However much the school has annoyed me, I don't really want to leave the person who replaces me in the lurch. So, I will probably spend the next 3 weeks sorting out vast descriptions on why my school is in no way configured like any other school in the country...although I'm not quite sure why myself. There will be bits to the job I will miss. There will be bits that I won't. I'll probably try and do a similar job in the US. Although, with no relevant letters after my name that might be difficult.
  14. How can you tell?
  15. sqdge

    VBScript Error

    I'll find out on Tuesday - by which time, someone will have probably done everything manually. Thanks for all your help on this.
  16. After today, I'm quite tempted to leave them with a smouldering pile of melted plastic and the faint sound of a computer going "Daisy, Daisy..."
  17. sqdge

    VBScript Error

    Set objShell = WScript.CreateObject("Wscript.Shell") objShell.Run "cacls.exe strFull /e /g strDomain & strUser:F" strFull = the full path to the folder strDomain = The school Domain
  18. sqdge

    VBScript Error

    OK, so now I can create the user and a folder. The next trick is to add permissions to that folder. I did try a piece of code but it didn't want to see to work. I put it down to the fact that I was putting strUser instead of DOMAIN\strUser However, I couldn't find a way of writing that down so that it was happy. Any ideas? On another note, when I am going for objUser.Put - I can't find the write terminology to define the User Logon Name (it defines the pre-windows 2k one fine, but I would quite like the other box filled out). I would also like to tell it to connect the H: drive to the user's home folder. Any help would, as always, be gratefully appreciated.
  19. sqdge

    VBScript Error

    Brilliant! I knew it would be simple.
  20. sqdge

    VBScript Error

    OK, so I'm really quite new to this. However, I know that it is necessary. I have been trying to work out how to design a little widget that will add a user (don't ask why, just accept that I need to do it!) I think I've got pretty close, but an error keeps on popping up. It looks like it relates to the password bit, but I'm not quite sure (it's on line 31). I'm sure one of you will solve it instantly...or suggest I stick to something else. Anyway, here's the code (why am I so nervous?) Option Explicit Dim objRootLDAP, objContainer, objUser, objShell, objOU, objFSO, objFolder Dim strUser, strName, strLast, strNum, strContainer, strPwd, strDirectory Dim intPwdValue Const ADS_UF_NORMAL_ACCOUNT = 512 strName = InputBox("First Name") strLast = InputBox("Last Name") strNum = InputBox("Number") strUser ="s"& Lcase(Left(strLast,3)) & strNum strContainer = "OU=Students ," strPwd = "foot" strDirectory = "F:\Students\2007\" intPwdValue = 0 ' Bind to Active Directory, Users container. Set objRootLDAP = GetObject("LDAP://rootDSE") Set objContainer = GetObject("LDAP://" & strContainer & _ objRootLDAP.Get("defaultNamingContext")) ' Build the actual User. Set objUser = objContainer.Create("User", "cn=" & strUser) objUser.Put "sAMAccountName", strUser objUser.Put "givenName", strName objUser.Put "sn", strLast objUser.Put "displayName", strName & " " & strLast objUser.Put "userAccountControl", ADS_UF_NORMAL_ACCOUNT objUser.SetPassword(strPwd) ObjUser.SetInfo objUser.AccountDisabled = FALSE objUser.SetInfo ObjUser.Put "pwdLastSet", intPwdValue objUser.SetInfo Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFolder = objFSO.CreateFolder(strDirectory & strUser)
  21. Only 202 working for me in Suffolk - all others time out.
  22. As far as I know, Google has a huge database of which ISPs come from which country - and which range of IP addresses they use. So, when it fails to detect which country you are from, it's probably because it doesn't recognise your ISP or because you are hiding behind some sneaky IP Mask.
  23. Not always. I have used Google.com in the UK and found that it thinks I am from another country - which gets a little annoying if you didn't originally notice, and then you realise that all your results are coming from Uzbekistan. So, I'm with the J-man on this one - typing those extra 2 characters can save some bother as well as meaning your homepage is fractionally faster to load (every second counts in the heady world of Edu-IT).
  24. Well, it went away, but it's come back again! The new term brings a new series of pointless questions, designed to take your mind of everything and anything. Today's question is not related, but I think it's a good way to know more about each other. The question is: What is currently your homepage....and why? I've attached a picture of mine. I use iGoogle - and the interesting bits you can see are: 1) Some interesting facts/fictions (factions?) in the top left. 2) The EduGeek feed 3) A quote of the day 4) A countdown to when I get to be in America with my gf (pictured against her will...I'll deal with any legal issues she may have with that) 5) A minimised widget that gives me the nice background pic of Oilseed Rape 6) The moon. I have no interest in astronomy, but I like to know whether I will be able to walk home from the pub safely or not. 7) Two clocks. I'm not very good at working out time differences. OK, your turn.
  25. It would be in a normal environment. However, my school is anything but normal - the server does not accept the trust between the two servers...however, it is perfectly possible to ping and read each other's server.
×
×
  • Create New...