[Mono-osx] How to logon to Win or Mac using credentials through code?

d_v dan.vandermolen at figpsoft.com
Thu Jan 22 11:46:40 EST 2009

What I would like to do is take a list of fully qualified paths on a Mac and
authenticate so I can get a list of files from the path and then zip them.

Ideally the list of paths on Mac OS X would include local, Mac network, SMB

Then I was hoping to use one Dot Net function to pass the user name and
password to impersonate a user before getting a list of local/network files
to copy and then zip them.

I don't have a Mac network here just one Mac on a Windows Network.  I can
only test Mac local and Mac SMB.

What is the path syntax for a Mac network path (non SMB?).

I am hoping a SMB fully qualified network path is the same as a SMB network
share in syntax for my path list and that I can use the same authentication
method.  Or I guess I could append the credential info to the SMB path - but
that is mono specific code I am hoping to avoid....

Anyways I hope I am on the right track.  I'll look at that link you sent.

Tomasz Muszyński wrote:
> d_v pisze:
>> I should be more specific, besides I have not heard any ideas yet :)
>> When I say "logon" I really mean that I am trying to copy a file over the
>> network and I would like to supply the username and password and
>> (domain). 
>> At this point I don't even know if a Mac requires a domain name...
>> If you can point me in the right direction I would be grateful. even a
>> link/bone :)
>> d_v wrote:
>>> Does anyone have a good way to logon to Windows and a Mac using
>>> credentials through code?
>>> I am using the Impersonator code and am now trying to get it to run on
>>> Mac
>>> 2.2_5 (latest build).
>>> The error I recieved was:
> ... windows code here cutted...
> The code You attached authenticates user on a specific Windows Share 
> using Win32 API, so it's worth nothing here :)
> What You want to do? Access SMB Shares? If so, how you want to do that.
> Did You try just to use URL paths, eg: smb://user:pass@address/share? (I 
> didn't try, because now I'm on Windows machine).
> Try to look there: 
> http://developer.apple.com/documentation/Networking/Conceptual/CFNetwork/CFNetwork.pdf
> Maybe You will find something. Ask on Apple Dev Forums, as this is Mac 
> OS X releated problem instead of Mono.
> Otherwise, you will have to call "mount" command manually to mount SMB 
> shares.
> If You want JUST to authenticate, you will have to use Kerberos or LDAP 
> (proper frameworks are available).
> Regards,
> Tomasz Muszyński
> _______________________________________________
> Mono-osx mailing list
> Mono-osx at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-osx

View this message in context: http://www.nabble.com/How-to-logon-to-Win-or-Mac-using-credentials-through-code--tp21591295p21608163.html
Sent from the Mono - OSX mailing list archive at Nabble.com.

More information about the Mono-osx mailing list