Dear WingFTP Team,
Is there an option that can be set to force the user to change their SFTP password!?
Regards
TeamBas
Forced user password change SFTP
-
- Posts: 12
- Joined: Wed Sep 15, 2021 8:59 am
Re: Forced user password change SFTP
Dear WingFTP-Team,
Can you help us to create a lua script to Change all user passwords for HTTPS and SFTP
We have more than 2000 users
Regards
TeamBas
Can you help us to create a lua script to Change all user passwords for HTTPS and SFTP
We have more than 2000 users
Regards
TeamBas
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Forced user password change SFTP
You can't change the password in the SFTP client software, SFTP protocol doesn't support such function.
And changing all user passwords for HTTPS/SFTP is possible, so do you want to change all user passwords into the same password?
And changing all user passwords for HTTPS/SFTP is possible, so do you want to change all user passwords into the same password?
-
- Posts: 12
- Joined: Wed Sep 15, 2021 8:59 am
Re: Forced user password change SFTP
No, we only want to force users to change their passwords and no more.
Thx
TeamBas
Thx
TeamBas
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Forced user password change SFTP
OK, you can force user change his password, but it is for the web client only, because if you use a FTP/SFTP client software, it can't popup a Change Password form.
-
- Posts: 12
- Joined: Wed Sep 15, 2021 8:59 am
Re: Forced user password change SFTP
Do you have an example of how to force this?
Thx
TeamBas
Thx
TeamBas
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Forced user password change SFTP
First, please enable the domain option "Domain > Settings > General Settings > Password & Security > Need to change the password on the first logon", also enable the option "Edit user -> General -> User can change their password" for all the user accounts.
And then execute the following Lua script under "Web admin -> Administration -> Console" (replace the string "YourDomainName" into your own domain name):
And then execute the following Lua script under "Web admin -> Administration -> Console" (replace the string "YourDomainName" into your own domain name):
Code: Select all
local domain = "YourDomainName"
local userlist = Split(c_GetUserList(domain), "\n")
for _,username in pairs(userlist) do
c_ResetUserLoginIP(domain, username)
end
-
- Posts: 12
- Joined: Wed Sep 15, 2021 8:59 am
Re: Forced user password change SFTP
How can I change this value for all users?
Thx
TeamBas
Thx
TeamBas
-
- Site Admin
- Posts: 2090
- Joined: Tue Sep 29, 2009 6:09 am
Re: Forced user password change SFTP
OK, you can run the following script under "Administration -> Console":
BTW, it seems you are using an old version of WingFTP, so you had better upgrade to the latest version 6.6.2 first.
Code: Select all
local domain = "YourDomainName"
local userlist = Split(c_GetUserList(domain), "\n")
for _,username in pairs(userlist) do
local user = c_GetUser(domain, username)
for k,v in pairs(user) do
if type(v) == "boolean" then
if v == true then
user[k] = 1
else
user[k] = 0
end
end
end
user.oldpassword = user.password
user.change_pass = 1
user.pass_length = 14
AddUser(domain, user)
end
BTW, it seems you are using an old version of WingFTP, so you had better upgrade to the latest version 6.6.2 first.
-
- Posts: 12
- Joined: Wed Sep 15, 2021 8:59 am
Re: Forced user password change SFTP
Thanks, Super worked :)
But the first Password script works only for the first user who tries to log in.
All other users are not prompted, maybe you have a solution for this?
Thx
TeamBas
Version 6.5.2
But the first Password script works only for the first user who tries to log in.
All other users are not prompted, maybe you have a solution for this?
Thx
TeamBas
Version 6.5.2