Page 1 of 1
User auditing?
Posted: Tue Jul 14, 2015 3:24 pm
by mherdeen
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?
Re: User auditing?
Posted: Wed Jul 15, 2015 3:27 am
by FTP
You can run the following Lua script under "Administration -> Console":
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
Just replace the string "domain1" into your own domain name.
Re: User auditing?
Posted: Wed Jul 15, 2015 1:55 pm
by mherdeen
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?
Re: User auditing?
Posted: Tue Jul 21, 2015 7:57 am
by FTP
Did you replace the domain name? And are you using the default XML or database for storing users?
Re: User auditing?
Posted: Tue Jul 21, 2015 12:57 pm
by mherdeen
Yes, I replaced the domain name and I think we are using xml for users, but I'm not sure. How can I tell?
Re: User auditing?
Posted: Wed Jul 22, 2015 3:43 am
by FTP
Please contact us via email, you had better provide some related screenshots.