User auditing?
-
- Posts: 5
- Joined: Mon Jan 09, 2012 1:09 pm
User auditing?
One of my customers is asking if there is a way to find out what users have never logged in to our SFTP site. Is there a simple query or report we can run to see if a user has never logged in?
-
- Site Admin
- Posts: 2086
- Joined: Tue Sep 29, 2009 6:09 am
Re: User auditing?
You can run the following Lua script under "Administration -> Console":
Just replace the string "domain1" into your own domain name.
Code: Select all
local domain = "domain1"
local userlist = Split(c_GetUserList(domain), "\n")
for _,username in pairs(userlist) do
local user = c_GetUser(domain,username)
if user ~= nil then
if user.last_loginip == "" then
print(username.." has never logged in\n")
end
end
end
-
- Posts: 5
- Joined: Mon Jan 09, 2012 1:09 pm
Re: User auditing?
Thanks for the help - My apologies for not understanding this better, LUA is pretty new to me. When I try to execute the script I get this error:
some error in ... Files (x86)\Wing FTP Server\lua\ServerInterface.lua:1014: bad argument #1 to 'find' (string expected, got nil)!
Any suggestions?
some error in ... Files (x86)\Wing FTP Server\lua\ServerInterface.lua:1014: bad argument #1 to 'find' (string expected, got nil)!
Any suggestions?
-
- Site Admin
- Posts: 2086
- Joined: Tue Sep 29, 2009 6:09 am
Re: User auditing?
Did you replace the domain name? And are you using the default XML or database for storing users?
-
- Posts: 5
- Joined: Mon Jan 09, 2012 1:09 pm
Re: User auditing?
Yes, I replaced the domain name and I think we are using xml for users, but I'm not sure. How can I tell?
-
- Site Admin
- Posts: 2086
- Joined: Tue Sep 29, 2009 6:09 am
Re: User auditing?
Please contact us via email, you had better provide some related screenshots.