Search code examples
sql-server-2005installationpasswordspolicyweak

SQL Server 2005 using setup.ini weak sapwd


I'm trying to install SQL Server 2005 via command line with an ini file.

The application I'm running with SQL Server 2005 requires a set SAPWD, however, this password does not meet our password policy.

I know there's a way to create the user with "CREATE LOGIN" and "CHECK_POLICY=OFF". But is there a way to make the setup.ini file ignore security policy as well?


Solution

  • Can't remember the actual version of Windows + SQL Server this got enforced but basically, you can't bypass any existing Windows password policy during install time. There are ways to temporarily disable the local security policy for passwords but that may trigger alerts with your security admins (good thing if it does but perhaps not for you).

    You can wrap your SQL Server in a second script/batch file which runs the SQL Server setup script with a secure SA password. When it's done, another script can turn the check policy off for SA and change the password to whatever your app needs.

    You're probably tired of hearing this but it really does bear repeating, an application depending on SA is bad. Having a hardcoded dependency on some simple password for SA is just unacceptable (even back in 2005, really). You may think risk is low because your SQL Server is running on your corporate LAN. Many, if not most, companies think that way until they discover malware, backdoors, etc.... that have been around for up to years on their LAN.