Problems getting username used to mount network volumes. 
Author Message
 Problems getting username used to mount network volumes.

Hello,

I am programming an application in RB that moves files to a specific
location on a Novell server.  My application has to log who moved the
files.  Do someone knows how I can retreive the username used to mount
a given volume?  I do not want the local username.  I need the actual
username used to mount the volume on the server. This application has
to work on Mac OS 8.1.  I was tring to access the libraries from the
AFP but cannot find the LIBs.  The only thing I know is that they are
loaded at system startup by AppleShare.

Please help.  It's been a while that I'm working on that one.

Yanick



Sun, 31 Oct 2004 04:18:04 GMT  
 Problems getting username used to mount network volumes.

Quote:

> Hello,

> Do someone knows how I can retreive the username used to mount
> a given volume?

I'll put it on the plugin todo list...

mfg
Christian

--
Was ist der Unterschied zwischen einem Telefon und einem Politiker?
Ein Telefon kann man aufh?ngen, wenn man sich verw?hlt hat.

http://www.christians-software.de (Kostenlose Mac/Win Software)



Mon, 01 Nov 2004 21:32:00 GMT  
 Problems getting username used to mount network volumes.
Hello Christian,

If I may suggest a path to follow for your plugin.  Look into the AFP
functions from the Apple Share Client documentation
(http://developer.apple.com/techpubs/macos8/pdf/ASClient.pdf) for
interresting functions.

My only problem is that I did not found the way to declare this
library in a RB code.  I searched for a library (Lib) for it on the
system hard drive but did not found any.  I the the mentionned book,
they mention that this library is loaded at system startup with
AppleShare.  How can you declare it then...

If you find a easy way to declare these functions, my problem is
completelly solved.

Thanks for your cooperation.

Yanick

Quote:


> > Hello,

> > Do someone knows how I can retreive the username used to mount
> > a given volume?

> I'll put it on the plugin todo list...

> mfg
> Christian



Sun, 07 Nov 2004 02:19:17 GMT  
 Problems getting username used to mount network volumes.

Quote:

> My only problem is that I did not found the way to declare this
> library in a RB code.

You can't. It's a framework which only can be loaded at runtime.
If you like I can add that to my plugin.

PS: It's only for Mac OS X.

Mfg
Christian

--
Kostenlose MacOS und Win95/98/NT Programme unter

http://www.christians-software.de



Sun, 07 Nov 2004 02:31:43 GMT  
 Problems getting username used to mount network volumes.

Quote:




> > > Hello,

> > > Do someone knows how I can retreive the username used to mount a given
> > > volume?

> > I'll put it on the plugin todo list...
[..]
> If I may suggest a path to follow for your plugin.  Look into the AFP
> functions from the Apple Share Client documentation
> (http://developer.apple.com/techpubs/macos8/pdf/ASClient.pdf) for
> interresting functions.

The function you're actually looking for is PBHGetLogInInfoSync in the
file manager. From Inside Carbon:

----
Determines the login method used to log on to a particular shared
volume.

OSErr PBHGetLogInInfoAsync (
    HParmBlkPtr paramBlock
);

* ioObjNamePtr

On output, a pointer to the user name used to establish the session. The
login user name is returned as a Pascal string. The maximum size of the
user name is 31 characters.

----

I've halfway thought of making this plugin myself, because it's been
requested before, but Christian's on the job. :-)



Sun, 07 Nov 2004 09:05:58 GMT  
 Problems getting username used to mount network volumes.

Quote:

> I've halfway thought of making this plugin myself, because it's been
> requested before, but Christian's on the job. :-)

I tried two other ways before.
I implemented 3 classes for the AFP Stuff till I saw that I can now
mount server volumes, but not see for existing ones who logged in.

The second way doesn't work here on Mac OS X.

So I just add yours...

Mfg
Christian

--
VirusScan has detected Windows 2000
(A)bort, (D)elete, (F)ormat C:?

http://www.christians-software.de (Kostenlose Mac/Win Software)



Sun, 07 Nov 2004 09:44:23 GMT  
 Problems getting username used to mount network volumes.

Quote:

> So I just add yours...

Argh!

"PBHGetLogInInfoSync not implemented" on the console.

And error -4 from the function...

Any idea?

(it should work on Mac OS X and all other ways might work on Mac OS 9)

Mfg
Christian

--
Heute: ALDI DOSen,  geruehrt oder geschuettelt
       garantiert aus unkontrolliertem Anbau
       1 kg DM 399,-
http://www.christians-software.de (Kostenlose Mac/Win Software)



Sun, 07 Nov 2004 10:46:44 GMT  
 Problems getting username used to mount network volumes.

Quote:


> > So I just add yours...

> Argh!

> "PBHGetLogInInfoSync not implemented" on the console.

> And error -4 from the function...

> Any idea?

Will experiment and email.


Sun, 07 Nov 2004 13:53:29 GMT  
 Problems getting username used to mount network volumes.
Chritian and Paul,

This plugin has to work with a RB application running on MAC OS 8.1.


It may be a good alernative for me to start the application without
any mounted volume and to capture the login name used to mount volumes
with the AFP stuff that Paul implemented.  After the application will
log the file transfer using this username saved in a pointer or a
variable.

Paul?  How did you implemented the AFP functions?

Again,  This application has to work on OS 8.1

Thanks for your work :-)  I greathly appreciate it.

Yanick

Quote:

> You can't. It's a framework which only can be loaded at runtime.
> If you like I can add that to my plugin.

> PS: It's only for Mac OS X.

> Mfg
> Christian



Mon, 08 Nov 2004 04:10:33 GMT  
 Problems getting username used to mount network volumes.

Quote:

> Chritian and Paul,

> This plugin has to work with a RB application running on MAC OS 8.1.

That's better. I may try it again with Mac OS 9.

But for X it doesn't work.

Mfg
Christian

--
PLZ Suche
Das neue Postleitzahlensuchprogramm

Vertrieb ber Arktis (www.arktis.de)



Mon, 08 Nov 2004 04:23:07 GMT  
 
 [ 10 post ] 

 Relevant Pages 

1. One more Newby / mounted volume from a network

2. getting network username (wrapping netapi.dll)

3. Mounting Volumes in RB?

4. Usernames in NT network

5. Usernames in NT network

6. Get Username in Windows-NT Network

7. Getting a UserName from NT

8. getting the win95 username

9. Getting UserName, and password On WinNT

10. getting username from uid

11. Find out the WinNT Username (only Username)

12. network volume and saving

 

 
Powered by phpBB® Forum Software