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?

1 Answer 1


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.

  • thanks for sharing your experience. You are right the notification would be a solution to circumvent the problem. However I still haven't give my hopes up that there could be a simpler and better solution. Microsoft should take care of Mac/Linux users as well especially after the SQL Server loves Linux campaign :-). Commented Jan 26, 2018 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.