‎04-30-2024 09:29 PM
Hello,
I would like to create two reports to obtain all local users and which group they belong to; one for Windows servers and another for Linux servers.
Solved! Go to Solution.
‎05-02-2024 05:36 AM
‎05-02-2024 05:38 AM - edited ‎05-02-2024 05:40 AM
It useless for linux but we have such query:
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tblLinuxSystem.OSRelease,
tblassets.IPAddress,
tblassets.Lastseen,
tblassets.Lasttried,
tblLinuxGroup.Name,
tblLinuxGroup.GroupId,
tblLinuxUser.UserName,
tblLinuxUser.HomeDirectory
From tblassets
Inner Join tblLinuxSystem On tblassets.AssetID = tblLinuxSystem.AssetID
Inner Join tblLinuxGroup On tblassets.AssetID = tblLinuxGroup.AssetId
Left Join tblLinuxUser On tblassets.AssetID = tblLinuxUser.AssetId And
tblLinuxUser.UserName = tblLinuxGroup.Name
Where tblLinuxGroup.GroupId > 999 And tblLinuxGroup.GroupId < 2000
Order By tblLinuxGroup.name
‎05-02-2024 04:45 PM
Thank you, this query only returns a few servers, not all of them. I have one to list just the users, and that works ok. I just don't know how to add the groups in the query.
Select Top 1000000 tblassets.AssetID,
tblassets.AssetName,
tblLinuxUser.UserName,
tblLinuxUser.Type,
tblLinuxUser.Comment,
tblassets.Domain,
tblassets.IPAddress,
tblassets.Description,
tblLinuxSystem.OSRelease,
tblassets.Lastseen,
tblassets.Lasttried,
tblLinuxUser.LastChanged,
tblLinuxUserLogon.Port,
tblLinuxUserLogon.IpAddress As IpAddress1,
tblLinuxUserLogon.LogonTime
From tblassets
Inner Join tblLinuxUser On tblassets.AssetID = tblLinuxUser.AssetId
Inner Join tblLinuxSystem On tblassets.AssetID = tblLinuxSystem.AssetID
Left Join tblLinuxUserLogon On tblLinuxUser.Id = tblLinuxUserLogon.Id
Where tblLinuxUser.HomeDirectory Like '/home/%'
‎05-02-2024 05:24 PM
‎05-02-2024 05:36 AM
Try this query for windows
‎05-02-2024 04:43 PM
I didn't try this one because it specified AD users, and not all of our servers are on AD domain. The query returns non-AD servers also, however, which is just what I am looking for, thank you!
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now