Network questions

Network questions

Postby Loach » Tue Aug 18, 2009 11:01 am

Hello!
Does anybody know the answers on this two questions:
1. How can I get my current login in Novell Netware ( something like function WNetGetUser() for Win )
2. Function GetIP() on my PC returns "0.0.0.0", but I have the static IP in my XP system. What I do wrong?

Thank's a lot.
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Postby anserkk » Tue Aug 18, 2009 11:42 am

1. How can I get my current login in Novell Netware ( something like function WNetGetUser() for Win )

Did you try the command "WhoAmi"

Regards
Anser
User avatar
anserkk
 
Posts: 1332
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Network questions

Postby Loach » Tue Aug 18, 2009 12:25 pm

Hello, Anser!
Thank you, but I can't find the command "WhoAmi" in FWH, xHarbour or OS Windows and Novell NetWare :(
May be it's only for Linux...
Have you some example of usage this command?
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Postby Gale FORd » Tue Aug 18, 2009 1:23 pm

Try netname( .t. )
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Network questions

Postby Loach » Tue Aug 18, 2009 1:34 pm

Try netname( .t. )

Thank's. But "netname" is return the name of current Windows User...
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Postby Gale FORd » Tue Aug 18, 2009 1:48 pm

Wouldn't the user name be the same? If you are not using the integrated log in then how about netbios.sys. Novell NetWare Requester provides a NetBIOS driver (NETBIOS.SYS) that emulates the NetBIOS protocol so netname( .t. ) should return correct network name.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Network questions

Postby Rick Lipkin » Tue Aug 18, 2009 3:09 pm

WnetGetUser() has always worked for me in both Novell and Microsoft networks .. NetName(.t.) works as well

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Network questions

Postby StefanHaupt » Tue Aug 18, 2009 8:01 pm

Hello,

Loach wrote:Does anybody know the answers on this two questions:
1. How can I get my current login in Novell Netware ( something like function WNetGetUser() for Win )


For clipper there was a lib called "netto", which has all functions especially for novell. It should be possible to adapt the functions to xHarbour. If you are interested, I can send it to you.
kind regards
Stefan
StefanHaupt
 
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Network questions

Postby Loach » Wed Aug 19, 2009 5:50 am

Hi!
Wouldn't the user name be the same

In our network (more than 500 pc) each user have the unique Novell name, but in OS Windows everybody have only "Admin" and "User" records. Than, if you have the same passwords (in Novell and Windows) after the Novell password inputing, Windows registration comes automaticly.
WnetGetUser() has always worked for me in both Novell and Microsoft networks .. NetName(.t.) works as well

In my case WnetGetUser() and NetName(.t.) returns "User" instead of my Novell name...
For clipper there was a lib called "netto", which has all functions especially for novell. It should be possible to adapt the functions to xHarbour. If you are interested, I can send it to you.

Thank you so much! If it's possible, send it on Loach(at)mail.ru.
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Postby Gale FORd » Wed Aug 19, 2009 2:02 pm

Netname() requires netbios to be turned on. You have to have either have NETBIOS.SYS for Netware Requester or in Windows have netbeui turned on.
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Network questions

Postby Loach » Wed Aug 19, 2009 2:19 pm

You have to have either have NETBIOS.SYS for Netware Requester

I have NETBIOS.SYS in windows\system32\drivers

in Windows have netbeui turned on.

Image
Do you mean this flag in network connection properties?
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Postby Gale FORd » Wed Aug 19, 2009 6:48 pm

Sorry it has been a while since we moved from Netware. I would have to do some more checking to find out why the netname() function is not working right. Here is another idea, I remember the Netware login script used to set an evironment variable "UserName". Click "Start" then "Run" and enter "cmd" in box and press enter. Type "Set" into cmd window and press enter. You should see one of them have the user name. Then use gete("User Name Var").
Gale FORd
 
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston

Re: Network questions

Postby Rick Lipkin » Wed Aug 19, 2009 7:59 pm

There is a netware 3rd party 'legacy' clipper and 32 bit .dll from Blinker ( blinkink.com ) called 'NovLib' .. it is specifically for Novell networks. It is a legacy product and did work 'somewhat' in a NDS\eDir environment. When Novell went away from the 3x environment to 4x and beyond .. we found syncronizing the user profile ( desktop ) using ( novell ) Zenworks ( dynamic local user ) solved all the problems .. that way WNetGetUser() would work because the user profile and the user login were the same.

Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Network questions

Postby Loach » Thu Aug 20, 2009 6:18 am

the Netware login script used to set an evironment variable "UserName"

Great idea!!! I even didn't think about it!!! It's all work well. There are two the same variables I need: NWUSERNAME and USERLOGINNAME.
Also I found it in Windows register: HKEY_CURRENT_USER\Volatile Environment.
So, many thank's for everybody!!!
Best regards!
Sergey (Loach) Abelev
fwh 9.04/xHarbour 1.2.1 (Rev. 6406)/Bcc55
Loach
 
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Postby Rick Lipkin » Thu Aug 20, 2009 6:29 pm

Loach

I work for a VERY large State Agency ( over 5000 users and desktops ) and we used to be a Novell shop .. When I used Novlib to interogate the Novell environment it was very specific to Novell .. and guess what .. we changed from Novell to Microsoft .. which made all the Novell specific libraries useless.

Just be mindfull that 'best practice' for any network ( I am also a network admin for 400 local people ) is to have the users profile made the same as the network id .. I just can not imagine why such a 500 user customer like yours would chose to sync a desktop the local Admin .. very dangerious and a lazy practice .. If they are a Novell shop they need to be using zenworks to manage their desktops with dynamic local user enforced .. that way ( like microsoft ) when anyone logs into a worstation .. their profile is created ( dynamically ) on the local box to match their login username on the network ..

Then WNetGetUser() will work in both network environments .. and you don't have to do anything special .. no environmental variables or special network specific software.

Just my 2 cents there .. I realize you are not in any position to make suggestions to your customer.

Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Next

Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 90 guests