Network questions

Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Network questions

Post by Loach »

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
User avatar
anserkk
Posts: 1280
Joined: Fri Jun 13, 2008 11:04 am
Location: Kochi, India

Re: Network questions

Post by anserkk »

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
Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Post by Loach »

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
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: Network questions

Post by Gale FORd »

Try netname( .t. )
Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Post by Loach »

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
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: Network questions

Post by Gale FORd »

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.
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Network questions

Post by Rick Lipkin »

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

Rick Lipkin
StefanHaupt
Posts: 824
Joined: Thu Oct 13, 2005 7:39 am
Location: Germany

Re: Network questions

Post by StefanHaupt »

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
Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Post by Loach »

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
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: Network questions

Post by Gale FORd »

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.
Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Post by Loach »

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
Gale FORd
Posts: 663
Joined: Mon Dec 05, 2005 11:22 pm
Location: Houston
Contact:

Re: Network questions

Post by Gale FORd »

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").
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Network questions

Post by Rick Lipkin »

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
Loach
Posts: 41
Joined: Thu Dec 22, 2005 7:39 am
Location: Gomel, Belarus

Re: Network questions

Post by Loach »

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
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Network questions

Post by Rick Lipkin »

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
Post Reply