🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #64

Problems with LogonUser API

#64
From: Darko MIletic
Date: Wed, 18 Jun 2008 23:30
14 lines
1514 bytes
I need to write a function that get's user profile folder for specified 
username. I use SHGetFolderPath API for this in conjunction with 
LogonUser. LogonUser is needed because since that is the only way (known 
to me) to get acl user token  needed for SHGetFolderPath. Everything 
works fine when account has password, however if I try to call LogonUser 
with empty password I get error ERROR_ACCOUNT_RESTRICTION that states:

Logon failure: user account restriction. Possible reasons are blank 
passwords not allowed, logon hour restrictions, or a policy restriction 
has been enforced.

So any idea how to get acl token for user account that has no password?

Thanks in advance
Technical Details
Message-ID: <48599a88$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,6c634ffce5a80c5a,start
X-Google-Attributes: gid10cc67,domainid0,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 18 Jun 2008 20:30:18 -0300
From: Darko MIletic <kiklop@fibertel.com.ar>
User-Agent: Thunderbird 2.0.0.14 (Windows/20080421)
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Problems with LogonUser API
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 190.245.108.162
Message-ID: <48599a88$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1213831816 190.245.108.162 (18 Jun 2008 16:30:16 -0700)
Lines: 14
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail