runas /savecred… don't accept cmdkey /add (credentials)

蹲街弑〆低调 提交于 2019-12-03 17:13:39

Under windows 7, the runas/savecred (interactive logon) credential is saved in a HIDDEN file in the directory c:\users\username\appdata\roaming\microsoft\credentials.

If you move this file out of this directory, the credential is not displayed in the Windows credential manager. Move the file back into the referenced directory, and the credential reappears. No other manipulation or tweaking is necessary.

You should save the interactive logon by running the runas /savecred command once and then moving the hidden encrypted file in and out as needed.

C. M.

You probably do not want to use the /savecred option, anyhow, as this saves your password (encrypted) to the profile globally and unconditionally, for the user to run any time, with any command that they can start with "runas", not just the command you intended. Saving your password in a CMDKey alias is not a good idea, either. If you need to be able to run a command using alternate or elevated credentials, the preferred (and more secure) method is creating a Scheduled Task to run the command with alternate/elevated credentials. See my answer here https://superuser.com/a/903881/229612 for the details on how to do this, and other information.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!