Sql-server – Change expired user password on sql server from linux

azure-data-studiolinuxpasswordsql server

I have got a colleague (software developer) working on Linux only. He connects to our SQL Server using a sql login with password. Occasionally the password expires and he has to choose a new one. Up to now he then heads over to a colleague with windows workstation and uses SSMS to change the password. I have just figured out that sqlcmd offers a parameter -z to change the password…however this parameter is not available within sqlcmd for linux. Azure Data Studio does not seem to support a password change either.

Is this it and you have to change the password using windows or is there any option from Linux which I haven't figured out?

Best Answer

There may be a better solution to this, but I often faced similar issues with Mac users whose passwords would expire, and due to lack of SSMS were unable to reset themselves.

I took to having a SQL Agent job to email any known non-Windows users of their password expiration 7 days out so they had plenty of time to issue the password reset themselves. This annoyingly requires keeping track of these users, but in a Microsoft shop it was manageable as it was only a few people.

In this case, if the account is already locked, ask your DBA to reset it and inquire about some sort of warning system like the above in the future. Or, like you said, find a willing Windows user to help you out.