touchring
2009-Jun-28 12:39 UTC
[Samba] I need to be able to retrieve windows user info on a windows server.
Hi, I'm a Linux newbie. I've been doing novice level programming on Delphi win32 for about 2 years, and recently, I've been exploring freepascal/Lazarus on Ubuntu because I want to port a small win32 application to Windows. I've managed to port over most aspects of the win32 app, including database, but I'm now stuck at trying to find a Linux equivalent of the netapi32 (a windows NT api function) which I actually use to call NetUserGetInfo (see http://msdn.microsoft.com/en-us/library/aa370654(VS.85).aspx) to retrieve Windows login user info on a windows server. At this point, I'm not sure whether I need to use Samba, or Wine, or a mix of both. I've tried researching on the net for the past 2 days to no avail, hope to receive some tips from you guys. :) -- View this message in context: http://www.nabble.com/I-need-to-be-able-to-retrieve-windows-user-info-on-a-windows-server.-tp24241182p24241182.html Sent from the Samba - General mailing list archive at Nabble.com.
Kai Blin
2009-Jun-28 17:22 UTC
[Samba] I need to be able to retrieve windows user info on a windows server.
On Sunday 28 June 2009 14:40:13 touchring wrote: Hi,> I've been doing novice level programming on Delphi win32 for about 2 years, > and recently, I've been exploring freepascal/Lazarus on Ubuntu because I > want to port a small win32 application to Windows. I've managed to port > over most aspects of the win32 app, including database, but I'm now stuck > at trying to find a Linux equivalent of the netapi32 (a windows NT api > function) which I actually use to call NetUserGetInfo (see > http://msdn.microsoft.com/en-us/library/aa370654(VS.85).aspx) to retrieve > Windows login user info on a windows server.Uh, tricky one.> At this point, I'm not sure whether I need to use Samba, or Wine, or a mix > of both. I've tried researching on the net for the past 2 days to no > avail, hope to receive some tips from you guys. :)I think at this point your best bet is to use the Samba-based libnetapi library. I'm not sure if that is packaged for your system or if you need to build samba yourself to get it. I'm also not sure on how to create pascal bindings for a C library, but I assume there is a way to do so. The Wine netapi32 implementation currently only works on the local machine. As I understood your question, you need to talk to a remote server, so the Wine library won't help you much. Improving that library in Wine has been on my todo list for quite a while, but other things tend to come in with a higher priority. Hope this helps, Kai -- Kai Blin WorldForge developer http://www.worldforge.org/ Wine developer http://wiki.winehq.org/KaiBlin Samba team member http://www.samba.org/samba/team/ -- Will code for cotton. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part. Url : http://lists.samba.org/archive/samba/attachments/20090628/da5dd820/attachment.bin