[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

How does NetUserGetInfo() get it's info?

Posted on 2002-04-03
3
Medium Priority
?
295 Views
Last Modified: 2013-12-03
Hi I'm having some problems here with user authentification. Our app uses NetUserGetInfo()to get the info about the current user (home dir, home path and of course user name). But I checked some documentation and couldn't find from what it builds up it's information (if it's even accessible to us) because it returns me a wrong path and I don't know where to change the info so it will get it correctly.

A solution I was proposed was that the conflict was with the /etc/passwd file from cygwin where the network paths are read. But the solution only worked randomly and now fails so obviously it's not the final solution.

So if anyone has any info on how NetUserGetInfo() gets it's info it'd be appreciated.

Rich.
0
Comment
Question by:mannycalaveras
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 800 total points
ID: 6915669
'NetUserGetInfo()' obtains the information from the SAM database, that is where NT/W2k stores it's account information (either locally or on a DC). The info it returns mainly is the one eneterd via the user manager.
0
 
LVL 1

Author Comment

by:mannycalaveras
ID: 6916094
Thanks a lot!

But would you happen to know how information are built into the database? My sys admin wrote part of the code that gets home dire for the user and it's also a nice coincidence that he also created the accounts on the current pc (with 2k) but he says he did not set the home directory himself. The info must come from somewhere else but where? It's not that important since at least we can go change it in the user accounts but I wonder if it's not going to be changed back in some way (*).

* It's because it was working earlier today and I saw that I left a trace in the code that looks for the user's home directory and removed it and recompiled and did not want to work after that.
0
 
LVL 86

Expert Comment

by:jkr
ID: 6916107
Well, what exactly is the difference (and your environment)? HOMEPATH e.g. is an environment variable that can be changed, whereas 'NetUserGetInfo()' queries the data that is used to set up the users profile.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For a while now I'v been searching for a circular progress control, much like the one you get when first starting your Silverlight application. I found a couple that were written in WPF and there were a few written in Silverlight, but all appeared o…
A theme is a collection of property settings that allow you to define the look of pages and controls, and then apply the look consistently across pages in an application. Themes can be made up of a set of elements: skins, style sheets, images, and o…
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question