Reset password for user with no login?

  • Hi. I have a couple of database users that aren't mapped to any logins, and I've been asked to reset their passwords. (Nobody knows what the passwords currently are.) These aren't orphaned users.

    I have Googled but I can't find anything; lots of tips for resetting login passwords which I can obviously do, but nothing really for users. Can anybody shed any light, please?

    Thanks

  • I would drop/create them with new passwords

    ______________________________________________________________________________Never argue with an idiot; Theyll drag you down to their level and beat you with experience

  • Thanks for the reply; I've tried that but I can't see how to specify a password.

  • if you have users explicitly created without logins, then there's is no password. users don't have passwords, only logins;

    I've create users to run EXECUTE AS on occasion, and of course for testing.

    so if you want to start using those login-less users, you have to create logins for them, and then alter user [x] WITH login [X] to map them out so people can login with them, but you probably don't want to do that, right?

    CREATE USER [ClarkKent] WITHOUT LOGIN

    EXECUTE AS USER= 'ClarkKent'

    SELECT USER_NAME() --I'm Clark Kent

    --Login Exists but wrong sid: remap!

    ALTER USER [HDS] WITH LOGIN = [HDS];

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • Thanks, Lowell; you've confirmed what I thought must be the case. I thought it couldn't be done but I'm in a new job and somebody who has been here a while was insisting that it could.

    Thanks again.

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

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