Creating User Dynamically And Using DPAPI


hello.

for project need to:

1. dynamically create local user account (for i'm using userprincipal class .net framework)

2. impersonate user (i wrote classes calls native logonuser (advapi32.dll)

3. use dpapi encrypt user data. have classes calls native cryptprotectdata , cryptunprotectdata (crypt32.dll)

the problem here when dynamically creating user, user specific folders not created, when call logonuser.

since dpapi folders, , folders not there, call fail.

now, if manually perform user login, folders created, , after good. but, need way create folders automatically, without performing manual login.

is there way that?

i missed calling loaduserprofile..

now, good.



Windows Server  >  Security



Comments

Popular posts from this blog

Error: 0x80073701 when trying to add Print Services Role in Windows 2012 Standard

Disconnecting from a Windows Server 2012 R2 file sharing session on a Windows 7,8,10 machine

Event ID 64,77,1008 Certificates Events Windows Server 2008, 2008R2