Login without a password

  • Hi

    Because of the user credential synchronisation of Navision we want to create logins without a password or may with an empty one. But with: create login xy with password = '' , a message means the password isn't strong enough(realy true).

    So with SSMS it is possible to create a login without password. How to do it with a script?

    Thanks for help

    Jan

  • add this to the end of your create login statement:

    , CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF

  • Could find it in the help, thanks.

    Also you can set the Default_Database. But what about the database role or the system role?

  • Adding role membership is a separate operation from creating a login. Use sp_srvrolemember to make a login a member of a server role and sp_adduser to add a user to a database and make it a member of a database role.

    Greg

    Greg

  • Greg Charles (10/10/2007)


    Use sp_srvrolemember to make a login a member of a server role and sp_adduser to add a user to a database and make it a member of a database role.

    With respect to SQL Server 2005, sp_adduser is deprecated. It still works for backward compatibility, but CREATE USER should be used. Use sp_addrolemember to add a database user to a role. For instance:

    USE MyDatabase;

    GO

    CREATE USER JohnDoe FOR LOGIN JohnDoe;

    GO

    EXEC sp_addrolemember 'MyRole', 'JohnDoe';

    GO

    K. Brian Kelley
    @kbriankelley

  • Doh!! And it's sp_addsrvrolemember to add a login to a fixed server role.

    Greg

    Greg

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply