Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

name column of syslogins table returns different values

Status
Not open for further replies.

ideapod

ISP
Jun 17, 2000
2
AU
Hi all,

I have done a query:

use master;
select name, loginname from syslogins where name = "foo"

and it has failed on a customer machine, but not my machine.

the reason is that in sql 7.0, the sysxlogins table is queried using suser_name(suser_id(name))

This function is returning a domain qualified user on the customer machine, but no domain qualification on my machine.

Any ideas?

The customer machine has two domains, I have one. Could this by why? I suspect so, but I want to hear other voices before I commit to making a change to this effect.

Cheers,

Mark Smith
 
Is the customer machine on your domain or part of a trusted domain on your network? If not, then there is not way you can release a login to an NT name if you are using NT Authentication...

Please specify...

Tom
 
Thanks for the reply Tom,

Their network is totally separate to mine, so they are not a trusted domain, nor can I see their domain from mine.

I have since found out that it was because there were users from two doamins granted access to SQL Server, and this meant that the query above always returns a domain qualified user for the 'second' domain.

Eg: user Domain1\UserA, and Domain2\UserB where the Domain1 is the nominal domain for the machine will result in UserA being shown with name=UserA, but userB being shown in Domain2\UserB.

So, the result is, I'll have to update my code to take account of the two domain case.

Thanks for your help!
 
Yup (as we say in Texas)... when you use NT authentication, users names will be prefixed with the domain as in domain\username...


Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top