Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts

Friday, February 24, 2012

add domain login from management studio

We have a SQL Server 2005 SP2 server that also functions as a
secondary domain controller in active directory. Everything works
extremely well except for 1 bug that was found today. Currently
windows authentication is the only method. When creating a new sql
login either physically at the server or through a remote desktop
connection the user is found in the domain and works just fine.
However when trying to do the same process using management studio
from a desktop connecting to the sql instance as soon as you try to
find the user in the domain you get this error: "The program cannot
open the required dialog box because it cannot determine whether the
computer name "COMPNAME" is joined to a domain."
I have sysadmin privileges on the sql server and if I use my login
name on the server physically I am able to create logins.
Any help would be greatly appreciated.
Thanks
MattI've previously posted a bug to connect.microsoft.com about this. Please go
there
(https://connect.microsoft.com/SQLSe...=126
183) and let them know of your problem.
--
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Matt Ziegler" wrote:

> We have a SQL Server 2005 SP2 server that also functions as a
> secondary domain controller in active directory. Everything works
> extremely well except for 1 bug that was found today. Currently
> windows authentication is the only method. When creating a new sql
> login either physically at the server or through a remote desktop
> connection the user is found in the domain and works just fine.
> However when trying to do the same process using management studio
> from a desktop connecting to the sql instance as soon as you try to
> find the user in the domain you get this error: "The program cannot
> open the required dialog box because it cannot determine whether the
> computer name "COMPNAME" is joined to a domain."
> I have sysadmin privileges on the sql server and if I use my login
> name on the server physically I am able to create logins.
> Any help would be greatly appreciated.
> Thanks
> Matt
>|||The problem that you are having is that when the SQL GUI opens the dialog to
select a user, it defaults to the local machine. Because the machine is
running as a domain controller it has no local accounts, and no local accoun
t
database.
Please go to connect.microsoft.com
(https://connect.microsoft.com/SQLSe...=126
183) and post additional information reguarding the issue.
--
Denny
MCSA (2003) / MCDBA (SQL 2000)
MCTS (SQL 2005 / Microsoft Windows SharePoint Services 3.0: Configuration /
Microsoft Office SharePoint Server 2007: Configuration)
MCITP (dbadmin, dbdev)
"Matt Ziegler" wrote:

> We have a SQL Server 2005 SP2 server that also functions as a
> secondary domain controller in active directory. Everything works
> extremely well except for 1 bug that was found today. Currently
> windows authentication is the only method. When creating a new sql
> login either physically at the server or through a remote desktop
> connection the user is found in the domain and works just fine.
> However when trying to do the same process using management studio
> from a desktop connecting to the sql instance as soon as you try to
> find the user in the domain you get this error: "The program cannot
> open the required dialog box because it cannot determine whether the
> computer name "COMPNAME" is joined to a domain."
> I have sysadmin privileges on the sql server and if I use my login
> name on the server physically I am able to create logins.
> Any help would be greatly appreciated.
> Thanks
> Matt
>

Monday, February 13, 2012

AD/ SQL Server 2000/ Trusted Connection in .Net

Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an
Active Directory controlled server. My AD account has access to teh database.
I want to login to the database using an Active Directory account, trusted
security...but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:
visual basic
code:---- Public Function Login() As String
' now create the directory entry to establish connection
Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
Me.strPass, Me.atAuthentType)
Try
' if user is verified then it will welcome then
Try
Return deDirEntry.Username
Catch exp As Exception
Return ""
End Try
Finally
'deDirEntry.Dispose()
End Try
End Function 'Login
This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
visual basic
code:----Dim
sConnstring As String = "User ID=" & sUserName & ";Initial
Catalog=VendorSample;Data
Source=MyServer...;Timeout=20;Trusted_Connection=T rue"----
6. I get the following error:
Login failed for user '(null)'. Reason: Not associated witha trusted SQl
Server connection.
I'm not well up on how AD works etc. but does anybody have any idea how to
get past this? I presume the problem is that it is not recognising the
username passed as the account I want to use.
There are two ways to logging into SQL Server: WIndows Security
(Trusted_Connection) or SQL Server Security. In either case, your "Login"
function is useless.
In your connectionString, you have "Trusted_Connection=True", that implies
the SQL Server uses Windows security, meaning, you do not need pass
username/password pair in ConnectionString (even there is user/password,
they are ignored). That means SQL Server accept the current windows/AD user
account credential, and then does the authorization based on this
credential. As long as the the windows/AD user account (which is running
your app) is given adequate permission to what he needs, the app should run
fine.
If you use SQL Server security (it must be enabled), you must have
user/password pair in the ConnectionString, and SQL Server authenticates it,
regardless whether you have done it in your own "Login" function or not. SO,
your "Login" function does nothing usefull here.
"Dec" <Dec@.discussions.microsoft.com> wrote in message
news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> Hi,
> I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> Active Directory controlled server. My AD account has access to teh
> database.
> I want to login to the database using an Active Directory account, trusted
> security...but I can't.
> Sequence of Events:
> 1. Login to Network using Novell account.
> 2. Start Application and it displays login screen.
> 3. Enter AD account details and press OK
> 4. This verifies against Active Directory Account using the following
> code:
>
> visual basic
> code:----
> Public Function Login() As String
> ' now create the directory entry to establish connection
> Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> Me.strPass, Me.atAuthentType)
> Try
> ' if user is verified then it will welcome then
> Try
> Return deDirEntry.Username
> Catch exp As Exception
> Return ""
> End Try
> Finally
> 'deDirEntry.Dispose()
> End Try
> End Function 'Login
> ----
> This all works fine and returns the username if the credentials match
> 5. Make database connection string (sUserName is the AD username):
> visual basic
> code:----Dim
> sConnstring As String = "User ID=" & sUserName & ";Initial
> Catalog=VendorSample;Data
> Source=MyServer...;Timeout=20;Trusted_Connection=T rue"----
> 6. I get the following error:
> Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> Server connection.
> I'm not well up on how AD works etc. but does anybody have any idea how to
> get past this? I presume the problem is that it is not recognising the
> username passed as the account I want to use.
|||Hi,
If I have logged onto pc/ network using a windows account, will the app
always run using this account? If so, is there any way to change this so that
the app run using an AD account instead? As you've probably guesed, I'm not
well up on Windows/ AD accounts etc. so please explain in very simple terms!!
Thanks.
"Norman Yuan" wrote:

> There are two ways to logging into SQL Server: WIndows Security
> (Trusted_Connection) or SQL Server Security. In either case, your "Login"
> function is useless.
> In your connectionString, you have "Trusted_Connection=True", that implies
> the SQL Server uses Windows security, meaning, you do not need pass
> username/password pair in ConnectionString (even there is user/password,
> they are ignored). That means SQL Server accept the current windows/AD user
> account credential, and then does the authorization based on this
> credential. As long as the the windows/AD user account (which is running
> your app) is given adequate permission to what he needs, the app should run
> fine.
> If you use SQL Server security (it must be enabled), you must have
> user/password pair in the ConnectionString, and SQL Server authenticates it,
> regardless whether you have done it in your own "Login" function or not. SO,
> your "Login" function does nothing usefull here.
>
> "Dec" <Dec@.discussions.microsoft.com> wrote in message
> news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
>
>

AD/ SQL Server 2000/ Trusted Connection in .Net

Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an
Active Directory controlled server. My AD account has access to teh database.
I want to login to the database using an Active Directory account, trusted
security...but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:
visual basic
code:---- Public Function Login() As String
' now create the directory entry to establish connection
Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
Me.strPass, Me.atAuthentType)
Try
' if user is verified then it will welcome then
Try
Return deDirEntry.Username
Catch exp As Exception
Return ""
End Try
Finally
'deDirEntry.Dispose()
End Try
End Function 'Login
----
This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
visual basic
code:----Dim
sConnstring As String = "User ID=" & sUserName & ";Initial
Catalog=VendorSample;Data
Source=MyServer...;Timeout=20;Trusted_Connection=True"----
6. I get the following error:
Login failed for user '(null)'. Reason: Not associated witha trusted SQl
Server connection.
I'm not well up on how AD works etc. but does anybody have any idea how to
get past this? I presume the problem is that it is not recognising the
username passed as the account I want to use.There are two ways to logging into SQL Server: WIndows Security
(Trusted_Connection) or SQL Server Security. In either case, your "Login"
function is useless.
In your connectionString, you have "Trusted_Connection=True", that implies
the SQL Server uses Windows security, meaning, you do not need pass
username/password pair in ConnectionString (even there is user/password,
they are ignored). That means SQL Server accept the current windows/AD user
account credential, and then does the authorization based on this
credential. As long as the the windows/AD user account (which is running
your app) is given adequate permission to what he needs, the app should run
fine.
If you use SQL Server security (it must be enabled), you must have
user/password pair in the ConnectionString, and SQL Server authenticates it,
regardless whether you have done it in your own "Login" function or not. SO,
your "Login" function does nothing usefull here.
"Dec" <Dec@.discussions.microsoft.com> wrote in message
news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> Hi,
> I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> Active Directory controlled server. My AD account has access to teh
> database.
> I want to login to the database using an Active Directory account, trusted
> security...but I can't.
> Sequence of Events:
> 1. Login to Network using Novell account.
> 2. Start Application and it displays login screen.
> 3. Enter AD account details and press OK
> 4. This verifies against Active Directory Account using the following
> code:
>
> visual basic
> code:----
> Public Function Login() As String
> ' now create the directory entry to establish connection
> Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> Me.strPass, Me.atAuthentType)
> Try
> ' if user is verified then it will welcome then
> Try
> Return deDirEntry.Username
> Catch exp As Exception
> Return ""
> End Try
> Finally
> 'deDirEntry.Dispose()
> End Try
> End Function 'Login
> ----
> This all works fine and returns the username if the credentials match
> 5. Make database connection string (sUserName is the AD username):
> visual basic
> code:----Dim
> sConnstring As String = "User ID=" & sUserName & ";Initial
> Catalog=VendorSample;Data
> Source=MyServer...;Timeout=20;Trusted_Connection=True"----
> 6. I get the following error:
> Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> Server connection.
> I'm not well up on how AD works etc. but does anybody have any idea how to
> get past this? I presume the problem is that it is not recognising the
> username passed as the account I want to use.|||Hi,
If I have logged onto pc/ network using a windows account, will the app
always run using this account? If so, is there any way to change this so that
the app run using an AD account instead? As you've probably guesed, I'm not
well up on Windows/ AD accounts etc. so please explain in very simple terms!!
Thanks.
"Norman Yuan" wrote:
> There are two ways to logging into SQL Server: WIndows Security
> (Trusted_Connection) or SQL Server Security. In either case, your "Login"
> function is useless.
> In your connectionString, you have "Trusted_Connection=True", that implies
> the SQL Server uses Windows security, meaning, you do not need pass
> username/password pair in ConnectionString (even there is user/password,
> they are ignored). That means SQL Server accept the current windows/AD user
> account credential, and then does the authorization based on this
> credential. As long as the the windows/AD user account (which is running
> your app) is given adequate permission to what he needs, the app should run
> fine.
> If you use SQL Server security (it must be enabled), you must have
> user/password pair in the ConnectionString, and SQL Server authenticates it,
> regardless whether you have done it in your own "Login" function or not. SO,
> your "Login" function does nothing usefull here.
>
> "Dec" <Dec@.discussions.microsoft.com> wrote in message
> news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> > Hi,
> > I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> > Active Directory controlled server. My AD account has access to teh
> > database.
> > I want to login to the database using an Active Directory account, trusted
> > security...but I can't.
> > Sequence of Events:
> > 1. Login to Network using Novell account.
> > 2. Start Application and it displays login screen.
> > 3. Enter AD account details and press OK
> > 4. This verifies against Active Directory Account using the following
> > code:
> >
> >
> > visual basic
> > code:----
> > Public Function Login() As String
> > ' now create the directory entry to establish connection
> > Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> > Me.strPass, Me.atAuthentType)
> > Try
> >
> > ' if user is verified then it will welcome then
> > Try
> > Return deDirEntry.Username
> > Catch exp As Exception
> > Return ""
> > End Try
> > Finally
> > 'deDirEntry.Dispose()
> > End Try
> > End Function 'Login
> > ----
> >
> > This all works fine and returns the username if the credentials match
> > 5. Make database connection string (sUserName is the AD username):
> >
> > visual basic
> > code:----Dim
> > sConnstring As String = "User ID=" & sUserName & ";Initial
> > Catalog=VendorSample;Data
> > Source=MyServer...;Timeout=20;Trusted_Connection=True"----
> > 6. I get the following error:
> > Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> > Server connection.
> >
> > I'm not well up on how AD works etc. but does anybody have any idea how to
> > get past this? I presume the problem is that it is not recognising the
> > username passed as the account I want to use.
>
>

AD/ SQL Server 2000/ Trusted Connection in .Net

Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an
Active Directory controlled server. My AD account has access to teh database
.
I want to login to the database using an Active Directory account, trusted
security...but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:
visual basic
code:----
-- Public Function Login() As String
' now create the directory entry to establish connection
Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
Me.strPass, Me.atAuthentType)
Try
' if user is verified then it will welcome then
Try
Return deDirEntry.Username
Catch exp As Exception
Return ""
End Try
Finally
'deDirEntry.Dispose()
End Try
End Function 'Login
----
--
This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
visual basic
code:----
--Dim
sConnstring As String = "User ID=" & sUserName & ";Initial
Catalog=VendorSample;Data
Source=MyServer...;Timeout=20;Trusted_Connection=True"--
----
6. I get the following error:
Login failed for user '(null)'. Reason: Not associated witha trusted SQl
Server connection.
I'm not well up on how AD works etc. but does anybody have any idea how to
get past this? I presume the problem is that it is not recognising the
username passed as the account I want to use.There are two ways to logging into SQL Server: WIndows Security
(Trusted_Connection) or SQL Server Security. In either case, your "Login"
function is useless.
In your connectionString, you have "Trusted_Connection=True", that implies
the SQL Server uses Windows security, meaning, you do not need pass
username/password pair in ConnectionString (even there is user/password,
they are ignored). That means SQL Server accept the current windows/AD user
account credential, and then does the authorization based on this
credential. As long as the the windows/AD user account (which is running
your app) is given adequate permission to what he needs, the app should run
fine.
If you use SQL Server security (it must be enabled), you must have
user/password pair in the ConnectionString, and SQL Server authenticates it,
regardless whether you have done it in your own "Login" function or not. SO,
your "Login" function does nothing usefull here.
"Dec" <Dec@.discussions.microsoft.com> wrote in message
news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
> Hi,
> I have a Windows Application, a Novell Network and a SQL Server 2000 on an
> Active Directory controlled server. My AD account has access to teh
> database.
> I want to login to the database using an Active Directory account, trusted
> security...but I can't.
> Sequence of Events:
> 1. Login to Network using Novell account.
> 2. Start Application and it displays login screen.
> 3. Enter AD account details and press OK
> 4. This verifies against Active Directory Account using the following
> code:
>
> visual basic
> code:---
--
> Public Function Login() As String
> ' now create the directory entry to establish connection
> Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser,
> Me.strPass, Me.atAuthentType)
> Try
> ' if user is verified then it will welcome then
> Try
> Return deDirEntry.Username
> Catch exp As Exception
> Return ""
> End Try
> Finally
> 'deDirEntry.Dispose()
> End Try
> End Function 'Login
> ----
--
> This all works fine and returns the username if the credentials match
> 5. Make database connection string (sUserName is the AD username):
> visual basic
> code:---
--Dim
> sConnstring As String = "User ID=" & sUserName & ";Initial
> Catalog=VendorSample;Data
> Source=MyServer...;Timeout=20;Trusted_Connection=True"--
----
> 6. I get the following error:
> Login failed for user '(null)'. Reason: Not associated witha trusted SQl
> Server connection.
> I'm not well up on how AD works etc. but does anybody have any idea how to
> get past this? I presume the problem is that it is not recognising the
> username passed as the account I want to use.|||Hi,
If I have logged onto pc/ network using a windows account, will the app
always run using this account? If so, is there any way to change this so tha
t
the app run using an AD account instead? As you've probably guesed, I'm not
well up on Windows/ AD accounts etc. so please explain in very simple terms!
!
Thanks.
"Norman Yuan" wrote:

> There are two ways to logging into SQL Server: WIndows Security
> (Trusted_Connection) or SQL Server Security. In either case, your "Login"
> function is useless.
> In your connectionString, you have "Trusted_Connection=True", that implies
> the SQL Server uses Windows security, meaning, you do not need pass
> username/password pair in ConnectionString (even there is user/password,
> they are ignored). That means SQL Server accept the current windows/AD use
r
> account credential, and then does the authorization based on this
> credential. As long as the the windows/AD user account (which is running
> your app) is given adequate permission to what he needs, the app should ru
n
> fine.
> If you use SQL Server security (it must be enabled), you must have
> user/password pair in the ConnectionString, and SQL Server authenticates i
t,
> regardless whether you have done it in your own "Login" function or not. S
O,
> your "Login" function does nothing usefull here.
>
> "Dec" <Dec@.discussions.microsoft.com> wrote in message
> news:E608FA02-488A-4E9A-BC5B-9AF816F28F87@.microsoft.com...
>
>

AD synchronization interval with SQL Server

Hi. Please help.
Background:
A user changes their Active Directory windows password on logon and then
attempts to connect to SQL Server but fails. Once a manual synchronisation o
f
the windows accounts on SQL server are done then the user can authenticate
again.
Question:
How long does AD take to auto synchronise with SQL (or vice versa)? Can this
value be changed? How?
Many thanksMorne wrote:

> Background:
> A user changes their Active Directory windows password on logon and then
> attempts to connect to SQL Server but fails. Once a manual synchronisation
> of
> the windows accounts on SQL server are done then the user can authenticate
> again.
> Question:
> How long does AD take to auto synchronise with SQL (or vice versa)? Can
> this
> value be changed? How?
I believe the delay is due to AD replication. The DC that SQL Server used
for authentication must not have been the DC the user authenticated to and
the new password had not yet replicated. Perhaps the SQL Server is in
another site. I don't know of a solution, other than to force replication,
perhaps with the repadmin utility on the DC (which is not of help to the
user).
Richard Mueller
Microsoft MVP Scripting and ADSI
Hilltop Lab - http://www.rlmueller.net
--|||Thanks Richard
I'll look into it. Appreciated.
Morne
"Richard Mueller [MVP]" wrote:

> Morne wrote:
>
> I believe the delay is due to AD replication. The DC that SQL Server used
> for authentication must not have been the DC the user authenticated to and
> the new password had not yet replicated. Perhaps the SQL Server is in
> another site. I don't know of a solution, other than to force replication,
> perhaps with the repadmin utility on the DC (which is not of help to the
> user).
> --
> Richard Mueller
> Microsoft MVP Scripting and ADSI
> Hilltop Lab - http://www.rlmueller.net
> --
>
>

Sunday, February 12, 2012

AD Groups

Our customer is using Windows Authentication to connect to SQL 2000. They
added their Active Directory group to the SQL logins but can not connect to
SQL 2000. For a test they added the individual domain user to an SQL login
and they can connect. For some reason they can not use their AD group to
connect to SQL 2000. Then they added local admin privledge to the AD group
and they can now connect. Do you have to have local admin privledge on an A
D
group to connet to SQL 2000? How can they remove that privledge and still
connect with thier AD group SQL login'
Thanks
RyanHi,
please refer following links :
www.sqlservercentral.com/forums/shw...and-SQL-2K.html
www.flatmtn.com/computer/Linux-LDAP.html
www.windowsitpro.com/SQLServer/Arti...841/pg/2/2.html
www.openldap.org/lists/openldap-sof...0/msg00304.html
http://forums.devshed.com/archive/t...s-ms-sql-server
:-)
Regards
Andy Davis
Activecrypt Team
---SQL Server Encryption Software
http://www.activecrypt.com
"Ryan" wrote:

> Our customer is using Windows Authentication to connect to SQL 2000. They
> added their Active Directory group to the SQL logins but can not connect t
o
> SQL 2000. For a test they added the individual domain user to an SQL logi
n
> and they can connect. For some reason they can not use their AD group to
> connect to SQL 2000. Then they added local admin privledge to the AD grou
p
> and they can now connect. Do you have to have local admin privledge on an
AD
> group to connet to SQL 2000? How can they remove that privledge and still
> connect with thier AD group SQL login'
> Thanks
> Ryan

AD

Is there anyway to pull data out of Active Directory and into say a SQL
table.

Like a user list...

Any examples..."AHartman" <Hoosbruin@.Kconline.com> wrote in message
news:Rs6dnWmnsYCnVfDcRVn-qQ@.kconline.com...
> Is there anyway to pull data out of Active Directory and into say a SQL
> table.
> Like a user list...
>
> Any examples...

There's an OLE DB provider for Active Directory, so you should be able to
create a linked server:

http://groups.google.com/groups?hl=...%40TK2MSFTNGP12

Simon