Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Find all the inactive Windows Logins Expand / Collapse
Author
Message
Posted Friday, January 31, 2014 5:14 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:31 AM
Points: 5,242, Visits: 9,497
Suresh B. (1/31/2014)
Subrata Bauri (1/31/2014)
Actually I want to list out all the inactive users(windows) which are not able to login into the OS & henceforth they are not able to connect the SQL Server but they are still alive in the SQL Server as records.


This is possible. Run this:
sp_validatelogins

Good shout - I wasn't aware of that stored procedure. I don't know how it handles logins that have been disabled in AD, though.

As far as I know, AD doesn't run on a SQL Server database. Here's a link on how to create a linked server to your AD server.

John
Post #1536725
Posted Friday, January 31, 2014 5:24 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 5:28 AM
Points: 67, Visits: 180
Suresh B. (1/31/2014)
Subrata Bauri (1/31/2014)
Actually I want to list out all the inactive users(windows) which are not able to login into the OS & henceforth they are not able to connect the SQL Server but they are still alive in the SQL Server as records.


This is possible. Run this:
sp_validatelogins


Thanks for your reply.

I have a user whose Login account is disabled in OS Level & the user is still valid user in SQL Server Level but the sp_validatelogins procedure is unable to find this user.
Post #1536730
Posted Saturday, February 1, 2014 1:42 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Tuesday, July 8, 2014 4:17 AM
Points: 1,101, Visits: 5,279
Both of you are right.
sp_validatelogins doesn't list the logins that have been DISABLED in AD.
It only lists the loigns that are DELETED in AD.
Post #1537064
Posted Friday, February 7, 2014 4:31 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 5:28 AM
Points: 67, Visits: 180
One more thing which I want to ask again:-

If the users(Windows Logins) are located in a single machine where the SQL Server exits then what should be the procedure.

Kindly reply.
Post #1539091
Posted Friday, February 7, 2014 4:37 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:31 AM
Points: 5,242, Visits: 9,497
So local Windows account instead of domain accounts? Exactly the same principle, except that the linked server process won't work. You'll have to search to find out whether it's possible to link to the local users and groups directory.

John
Post #1539092
Posted Friday, February 7, 2014 4:46 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 5:28 AM
Points: 67, Visits: 180
John Mitchell-245523 (2/7/2014)
So local Windows account instead of domain accounts? Exactly the same principle, except that the linked server process won't work. You'll have to search to find out whether it's possible to link to the local users and groups directory.

John


it's Local Windows accounts which I want work on.
Post #1539095
Posted Friday, February 7, 2014 4:48 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 9:31 AM
Points: 5,242, Visits: 9,497
Good.

Exactly the same principle, except that the linked server process won't work. You'll have to search to find out whether it's possible to link to the local users and groups directory.

John
Post #1539096
Posted Friday, February 7, 2014 4:54 AM


Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 5:28 AM
Points: 67, Visits: 180
Ok.

Thank you for valuable time & coordination.
Post #1539098
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse