#128018 - 2004-10-17 02:56 PM
Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
Hi,
I am making 2 kinds of scripts and each of them are running nicely, I only have 2 problems with each.
The first script is a script (using kixforms) that reset's user passwords, It works like a charm, only problem is the user that actually uses the script has to have administrator privilidges. Off course I don't want to give that user administrator privilidges so I am looking for a way (without runas/sanur or external progs) to only give the script administrator priviliges.
The second script is a script that adds new users to the Active Directory, works fine as well (also admin probs like b4) but for the profile path, it actually has to make the Folder where the profile path will be stored, now this on itself isn't a problem but setting the rights (ACL's) to that folder is, it has to give the Domain Admins full access, and the user who's profile is stored in there full access. I tried external progs for it as well, such as CACLS and XCACLS, but I was wondering if I could do that using Kix only.
In any case I wanna take this opportunity to thank everyone on this message board for helping users as much as you do, over the last few weeks I've learned alot from you without having to ask anything. Thanks
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128020 - 2004-10-17 03:54 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
I don't elevate them, before I wrote the script in VBS, making a C++ executable run the runas/sanur/vbs commandline, I am looking for a way to get it all in kix, preferably in the script as admin. What do you mean by "delegate" tho (my english ain't that good)
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128022 - 2004-10-17 04:27 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
What I ment to say is that I don't elevate the User Accounts. Also I asked what "delegation" ment, in other words I couln't translate it to my own language (hence why i said my english aint that good)
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128024 - 2004-10-17 05:25 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
OK, I understand that, then yes I want to elevate the script. Since I can't give those users (mainly staff) any more rights then they already have, which means I have to limit the access to AD to the script only.
Furthermore do you also have an answer for the path/dir creation ACL's ?
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128026 - 2004-10-17 06:06 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
I understand that, and can apreciate that. My boss is fully aware of this and even asked to do it like that with the VBS example, but in you position I wouln't take my word for that either. Anyway could u please look into my folder ACL problem ?
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128029 - 2004-10-17 10:44 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
well, I'll take Delegation as an answer for item one, I should be able to set permissions ok on 2k3 AD, jes will take some figuring out.
As for item 2, technically if you would enter the file path in the AD's user profile it should set permissions to it accordingly, however it doesnt, XCACLS and CACLS only sets 1 user as full access it doesn't have a feature to "ADD" a user IE admin and the user.
At any rate I would like to thank you both for helping me on this subject, to clarify it a bit more, we are a very small company that make networks for schools, the reset password proggy I am making (with kixforms) should enable headmasters to reset (dumb) teachers passwords to a standard password and when they login they can change it again cos windows will then prompt for them to change it.
The second lets the headmaster add a new teacher to the AD.
Anyway thx again for helping me on my way here
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128030 - 2004-10-17 11:07 PM
Re: Adding Users to ADSI ?
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11629
Loc: CA
|
Quote:
As for item 2, technically if you would enter the file path in the AD's user profile it should set permissions to it accordingly
I'm sorry, but no it does not work that way. It only sets the users account to that folder as a home folder which you can then also set a drive letter to map to if wanted.
Okay, as I read your recent reply it is not what you orignally said or asked. As you replied just now it is very doable. If you only want a couple people to do as you ask then we can help you accomplish that task.
Let's just make sure we're on the same page with what it is we are really doing or wanting here.
|
|
Top
|
|
|
|
#128034 - 2004-10-18 08:49 PM
Re: Adding Users to ADSI ?
|
Anonymous
Anonymous
Unregistered
|
Quote:
Okay, as I read your recent reply it is not what you orignally said or asked. As you replied just now it is very doable. If you only want a couple people to do as you ask then we can help you accomplish that task.
Let's just make sure we're on the same page with what it is we are really doing or wanting here.
Only thing I want the script to do is make users in AD, their homepath should have set those users as owner (ie \\server\personal$\username the username folder should have ACL's set to the user as owner with full rights, and admin with full rights, also I made sure the script cannot do anything else but make users in seletive groups, they can't add an admin for instance. But I need the script to have admin privilidges to set those ACL's and to actually be able to have rights to add users to AD.
If you want I can paste the code here.
|
|
Top
|
|
|
|
#128035 - 2004-10-18 08:50 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
Sorry forgot to login, anonymous is me.
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
#128036 - 2004-10-21 02:30 PM
Re: Adding Users to ADSI ?
|
Chance
Fresh Scripter
Registered: 2004-10-17
Posts: 12
Loc: Almere, The Netherlands
|
Quote:
Quote:
As for item 2, technically if you would enter the file path in the AD's user profile it should set permissions to it accordingly
I'm sorry, but no it does not work that way. It only sets the users account to that folder as a home folder which you can then also set a drive letter to map to if wanted.
Actually it does if you set the profilepath to: \\Server\profiles$\%username%\My Profile\
when that user logs in, AD will create the folder and set rights accordingly, only admin's can't access them but thats good enough for me.
I am almost finished with my tools, I set the ppl who can create account to have rights in the "accountoperators" group. Only problem I have now is I need to figure out how I get a user's full LDAP path (the original one) for instance if a user is made in:
LDAP://CN=administration,OU=Administration,OU=Users,DC=microsoft,DC=com
and lateron is added to for instance Staff, how would I get a users original LDAP path ?
_________________________
can not join #Real_Life (invite only)
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
1 registered
(Allen)
and 905 anonymous users online.
|
|
|