3 weeks ago
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.
3 weeks ago
3 weeks ago - last edited 3 weeks ago
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
3 weeks ago
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/%'
3 weeks ago
3 weeks ago
Try this query for windows
3 weeks ago
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