Hi Folks, need some advice on the following...
We have a share which is currently set to only visible for Domain Admins, however, I need to be able to give a non domain admin the right to copy files to a folder within that share. I was hoping something like this would work...
id="Administrator"
pass="adminpassword"
dssetcredent(id,pass)
filecopy(source,destination,@false)
dssetcredent("","")
However, I'm getting a copyfile error 5 (access denied), what am I doing wrong?
Thanks
The dsSetCredent function is part of the ADSI extender and it is used to set the credentials used with other ADSI extender functions when communicating with an LDAP servers like a Windows server that is hosting Active Directory. It has absolutely no effect on the credentials used by any non ADSI extender functions.
You did not provide any Windows version information but if UAC is involved your options are limited. If you are dealing with Windows 8.x you have even fewer options. Your best bet may be to setup a share that standard users can copy files to. You could then create a server side script that moves those files to a more secure area, if security is an issue.
Actually, the wntAddDrive() function may well solve the problem as stated by the O.P.
In particular, even if you are logged on as a domain user and the remote server is a domain member, too, if you haven't accessed the remote server recently then using wntAddDrive() with admin credentials specified may solve the problem by establishing an admin identify just for that one remote server session.
Give it a whirl and report back what happens...
Good idea!