CMDKEY script no password prompt

Here is a script I'm using to store the credentials for server shares:
@echo off
cd C:\Windows\System32
cmdkey /add:PrintServer /user:demo\%username% /password:%pw%
Now, if I'm running the command from a prompt live, then it works just great without prompting for the password that I'm using. But I want to take it a step further. I want this command in a batch file to run at log on for the end users and NOT prompt them
for the password, but store the credentials successfully in the credentials manager without any user intervention.
Users are running in Win7, on a SUSE environment with ZenWorks, pushing out logons with KBOX. Regardless, it can be replicated by using workgroup mode in Windows. The batch file won't be kept on the end user's computer, but back on the server.
So how can I use cmdkey with a batch file at logon without a password prompt? I know this isn't recommended, regardless I still need an answer or an alternative process. Time is crucial, thanks ahead of time.

Hi,
I create a batch file with cmdkey, then set it as logon script, it works as expected in my test. without any prompts when I want to connect to that server I set.
I suggest you check the credential manager, and see whether the credential has been added into the manager, I doubt that the logon script doesn't run correctly.
Yolanda Zhu
TechNet Community Support
Yolanda, 
I've done this multiple times and I'm still prompted to enter a password if running the batch. I'm not being prompted if I run the command live in a prompt.
The credentials don't exist in credentials manager prior to running the command. I'd love to get this working. I just can't go around to 200 workstations and type this command, wold love to find how to do this as a batch log on script.

Similar Messages

  • Shell script for password prompt

    Hi
    I am using Solaris9 and trying to change password of a user with command:
    passwd userid
    i want password to be given from text file or command line so that password is not prompted on the command line. Is there any way to do this?
    I guess i am able to force the carriage return to be entered while entering the password from command line.
    This is what I am doing:
    passwd userid << EOF
    newpassword
    newpassword
    EOF
    But after this, it still gives me New Password prompt. Any help will be appreciated.

    You could have a look at 'expect', it can set the password for you..
    .7/M.

  • How to avoid password prompt in shell script for zip password protection

    Hi
    I am trying to set password protection to my oracle database export backup. Once the backup completed, it should compress with a password protection. Thats the plan. Initialy we were using the gzip for the compression. Then realized that there is no password protection for the gzip. Started using zip option. I tried using
    zip -P <password> filename
    But it was throwing below error.
    -bash-3.2$ zip -P expreports REPORTS_2013FEB14.dmp
    zip warning: missing end signature--probably not a zip file (did you
    zip warning: remember to use binary mode when you transferred it?)
    zip warning: (if you are trying to read a damaged archive try -F)
    zip error: Zip file structure invalid (REPORTS_2013FEB14.dmp)
    Not quite sure why.
    Then I used zip -e REPORTS_2013FEB14.dmp.zip REPORTS_2013FEB14.dmp
    But this prompting for the password. As I am trying to put the command in the script. It will be tough if it prompts for the password.
    I would like to know how to avoid the password prompting by saving somewhere or how the code should be written. Tried using expect feature of shell script. Below was the code I tried. It didnt work.
    [oracle@SF40V6636 test]$ cat repexp.sh
    zip -e REPORTS_imp.log.zip REPORTS_imp.log
    expect "Enter password:"
    send "imprep"
    expect "Verify password:"
    send "imprep"
    So please help in avoiding this password prompt or let me know how to change the code.
    Thanks
    SHIYAS M

    How about using gpg and adding a secret key to the requirement of a password? No one should be able to decrypt your file, not by knowing only the password.
    1. Generate a public and private key pair:
    $ gpg --gen-key
    When it shows "We need to generate a lot of random bytes…" open another terminal session and type "dd if=/dev/sda of=/dev/null" to create traffic. When the public and secret key created and signed you can Ctrl-C the dd command.
    To see what you have created:
    $ gpg --list-keys
    2. Encrypt and gzip your stuff:
    $ tar zcf stuff.tgz file_or_folder
    $ gpg recipient "Some Name" encrypt stuff.tgz
    $ rm -f stuff.tgz
    3. Decrypt and extract the archive:
    $ gpg batch yes --passphrase "password" -d stuff.tgz.gpg > stuff.tgz
    $ tar zxvf stuff.tgz
    Again, knowing the password alone will not let anybody decrypt your stuff.

  • Sudo root Password Prompt

    Hi, I've built a widget that allows the user to modify the power settings wake-up schedule.
    I did this through the pmset Unix command, like this:
    widget.system("/usr/bin/sudo pmset repeat wake MTWRFSU "hours+":"+minutes":00", null);
    I am forced to use sudo, because OS X's security settings block the widget's access to pmset. The issue I have is that since the sudo command returns a password prompt in the Terminal (in the Unix console), on the user side nothing happens, when they use the widget. The whole process is cancelled due to an invisible password request.
    The question I am asking is, is there a way to prompt the user for the root password through OS X's default user password dialog box, instead of prompting through the background running Unix console? Is there a Unix or AppleScript command that does this?
    And if there isn't, is there a way to send password information (that was entered in the widget) directly to the Unix console?

    Applescript allows you to run a shell command using "Administrator privileges" (basically like sudo, only better).
    The following AppleScript will run "/bin/ls -la" with root privileges by prompting the user in a standard Authorization Services dialog:
    do shell script "/bin/ls -la" with administrator privileges
    (Note: you do not need to use sudo in there anywhere, that's handled for you automatically; simply list the process you want to run and the options).
    If you knew the user's password prior to running this command, you could do the following:
    do shell script "/bin/ls -la" with administrator privileges password "myPlainTextPassword"
    Note that this isn't as secure as letting AuthorizationServices handle the password prompt.
    You may want to play around in Script Editor (/Applications/AppleScript/) until you get the command syntax down right. Then, you can use the "osascript -e" shell command to execute the script from your widget.
    For example, the following shell command would have basically the same effect as executing the above-mentioned AppleScript:
    osascript -e "do shell script "/bin/ls -la" with administrator privileges"
    So, to review, in case your head is starting to swim a bit... You're executing a shell command (osascript) to execute an AppleScript which in turn uses AuthorizationServices (prompt for password) to perform a shell command with root privileges.
    Hope this helps...

  • Applescript "with administrator privileges" and without Password prompt

    i,
    I have to configure some phone settings in the central VOIP/VPN/Gateway Router via a ssh (with certificate) command.
    There is only a option to allow or disallow the ssh access in the router. Therefor I wrote a applescript to allow only the specific ssh command "set /Setup/Voice-Call-Manager/Call-Router/Call-Routing/". To avoid the configuration access for anyone and to hard code passwords I have to execute this script with root permissions (do shell script "/usr/bin/su - " & user & " -c " & "'" & cmd & "'" with administrator privileges"). In any other unix implementation I can use "chmod 4755; chown 0:0". Even I compiled the Applescript and stored it as Carbon App, I get a user/password prompt.
    How can I avoid this prompt or authorize the script/app in any way?
    Thanks Henri

    I agree, but to use the private key of the applescript caller opens any user the ability to change any WLAN key, VPN settings or delete the admin account, not a good idea....
    Therefor I would like to run the applescript with root, "su - <adminuser> ssh router set ....".
    This restricts the access to the router config to this applescript and I would like avoid the hard coding of the root password in the applescript.
    I tried also the add the command to /etc/sudoers, this work fine from the command line but how to call "sudo applescript" from the desktop without entering the admin password?
    Thanks
    Henri

  • How do i stop an old apple ID and password prompt from always popping up on my phone during normal use ?

    How do i stop an old apple ID and password prompt from popping up on my phone screen during normal operations ?

    How to change the Apple ID on my iOS Device
    Settings > iTunes & App stores.
    Tap your Apple ID, sign out then sign back in with new AppleID.
    Settings > Facetime.
    Tap your Apple ID, sign out then sign back in with new AppleID.
    Settings > Messages.
    Turn off iMessages, wait 10 seconds, then turn it back on.  Go to 'Receive messages at' and then tap your Apple ID.  Sign out of the old ID, then sign in with new Apple ID.
    Settings > iCloud.
    Delete the account (make sure to KEEP the information on your phone), then turn it back on with new Apple ID.
    Also, delete any apps that were downloaded with the 'old' Apple ID, then reinstall them with your 'new' ID.

  • Computer Shuts Down At BitLocker Boot Password Prompt

    Hi All,
    I have been using this computer for almost 6 months now with absolutely no problems until I encrypted my system drive with BitLocker. I am not using a TPM. Now, almost every time I get to the password prompt for BitLocker at boot, my computer turns completely
    off. I am using an ASUS Z97-E. ASUS tech support was completely useless and wanted to pass the blame instead of help, so I guess I'm on my own as far as their support.
    I have read previously that this may be related to ASUS products. I cannot seem to get it to boot reliably. If I completely remove power from the machine by unplugging it, sometimes that will give me enough time to enter my password. If I don't, often, it
    will only give me a couple seconds (and my password is pretty long) before shutting down.
    I have tried disabling Secure Boot and that seemed to help at first but then the problem came right back.
    There is a BIOS update available but I'm not confident it will fix the problem.
    Are there any specific BIOS settings I can change to make BitLocker stop making my computer shut down? Any Windows settings I can change that might help? 
    I'd really like to keep my data encrypted but I'm not sure if this hassle is worth it.

    Hi,
    Based on my research, this is a firmware problem. It does not matter what authentication method (TPM/without TPM/PIN+TPM/Password only/...) is used, it leaves you only some seconds before it shuts down.
    It's recommend you contact ASUS tell them to try and reproduce it. They would need to fix their BIOS.
    In addition, we could try to disable "fast startup" as below steps to see if it could be as a workaround:
    1.In Control Panel, open the Power Options item.
    2.Click the Choose what the power buttons do link.
    3.Clear the Turn on fast startup (recommended) check box.
    4.Click Save Settings.
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Freezes on startup during password prompt

    Whenever I restart my computer it boots normally until the password prompt comes on. It still looks fine until i go to enter in a password.
    As soon as i begin to enter a password the color spinning wheel appears and will start spinning forever. I usually have to turn it off and then turn it back on again.
    Then sometimes on restart it will just go to a gray apple screen with the apple logo and hte spinning progress dial. This can also go on forever.
    After many times of restarting the computer it will work. But i just switched to a mac and was wondering if there is anything I might be doing wrong or anything I should do to fix this.
    Thanks
    MacBook Pro Mac OS X (10.4.10)

    There's no reason not to take it in or call Applecare on the phone--I have found them to be very good at walking you through problems and determining if it is just a matter of setting preferences or if there is something actually wrong.
    If you have access to an Apple store, I think they have free classes which will teach you how to use your computer (at least our Apple Store does). You might find this helpful if you are new to Macs.
    Good luck!

  • Password prompt after screen saver or lock screen

    I am running Yosemite on two Macs – an early-2008 MBP 15" and a mid-2010 MBP 13". Both are configured for password after screen saver or when waking up. I have hot corners configured to enable screen saver (lower left), lock screen (upper right), disable screen saver (lower right). On awakening from either screen saver or lock screen, the 15" requests the password in a screen similar to the login after boot or switch user screen – the fullscreen, blurry background, prompt in the center. The 13" prompts for a password in an ordinary modal dialogue window that includes a lock icon and displays on a black background. The 13" has an external monitor attached, but the behavior is the same if it's disconnected. Both systems have one user, and identical settings in Users and Groups. The behavior is the same whether the Guest user is enabled or disabled.
    I can't find any settings to account for the difference, even obscure ones shown in Onyx. Any ideas as to why the password prompt is handled differently in these two cases? Thanks in advance...

    Hi Betty,
    http://www.cmu.edu/computing/doc/security/mac/screensaver/index.html

  • WEB DMS Office Document Access- Password Prompt

    Dear All,
    Business Users are Using MS Office 2007 and MS Office 2003
    We have Configured WEB DMS for Development System
    In SE80 when CVAW_ENTIRE is Executed and when DIR is Accessed there using Display/Change, All file formats are accesed fine without any password prompt,But While Opening Microsoft Office Documents(.doc,.docx,.xls,.xlsx,.ppt..pptx) from WEB DMS DIR it gives UserName Password Prompt (Warning: This server is requesting that your username and password be sent in an insecure manner (basic authentication without a secure connection))....
    When i don't enter username and password and press cancel file opens in Read Only Mode...So, i need is by default file shoud open in read only mode without asking unnecessary Password Prompt...Above is applicable when MS Office 2007 is installed in local PC
    For Office 2003 the problem is there for .xls,.xlsx,.ppt,.pptx files , however .doc files opens fine and does not ask for any password prompt and opens in read only mode directly.
    The above both scenarios for Office 2007 & Office 2003 works fine with Mozilla Firefox Browser and does not prompt for any passwords.
    Help is Required urgently
    Regards,
    Akshit Patel

    Dude
    I'm also trying to enable WebDMS. I have already configured in SPRO.
    In SE80, pointing on "CVAW_ENTIRE->Pages with Flow Logic->index.htm", when I click on "Test/Execute", a webpage opens but throws an error:
    Business Server Page (BSP) error
    What happened?
    Calling the BSP page was terminated due to an error.
    SAP Note
    +    * The following error text was processed in the system:+
    +      Die URL enthält keine vollständige Domainangabe (sap-dev statt sap-dev.).+
    Exception Class     CX_FQDN
    +Error Name     +
    Program     CX_FQDN=======================CP
    Include     CX_FQDN=======================CM002
    ABAP Class     CX_FQDN
    Method     CHECK
    Line     10
    Long text     -
    Error type: Exception
    Your SAP Business Server Pages Team
    The URL of the webpage looks like this:
    http://sap-dev:8080/sap/bc/bsp/sap/cvaw_entire/index.htm?sap-client=747&sap-sessioncmd=open
    Please help.
    Thanks & Regards
    Amaresh Makal

  • Error to execute the script through command prompt

    I tried to execute the script through command prompt. I got some following error. Could you please advice me how to rectify this.
    cscript D:\JS\Test.js
    Microsoft (R) Windows Script Host Version 5.6
    Copyright (C) Microsoft Corporation 1996-2001. All rights reserved.
    D:\JS\Test.js(1, 1) Microsoft JScript runtime error: 'app' is undefined.
    Thanks,
    Prabudass

    I haven't use CS for quite some time and file associations may not work with the command prompt.
    You can try using Windows Explorer to browse to a .js file then right click on that file. From the popup menu choose Open With. Even if you see Photoshop in the file list choose Browse at the bottom. Browse to Photoshop and make sure to check 'Always use selected program...'
    If that doesn't work you will need to create an action that runs your script and make a droplet from that action. You can then use the droplet in the command prompt. You may also need to create a 'dummy' image file to launch the droplet with if you script doesn't require an open document at startup. See http://www.ps-scripts.com/bb/viewtopic.php?t=967

  • Password prompt Error with Bex and Excel 2007

    Hi Guru's,
    We have a problem with end users that have the Bex add-in loaded in Excel 2007 when they are using a different 3rd party add-in.  The problem is when they close Excel, they get password prompted for a password protected VB project in the workbook.
    I found a MSFT article that sounds exactly like the problem I'm seeing.  Link is below. 
    [http://support.microsoft.com/kb/280454]
    Has anyone experienced this problem?
    Thanks
    Brian Winterlich

    Hi Brian:
    Take a look at SAP Note 1397278 - "BPC: Pop-up window prompting for a password to unprotect the sheet in Journal template with Office 2007 SP2".
    Regards,
    Francisco Milá

  • Password prompts - Exchange 2013 RTM vs. [Outlook 2007 & Outlook 2010] - Fully patched

    Exchange 2013 RTM  - Multi-Tenant
    ExternalClientAuthenticationMethod : Ntlm
    InternalClientAuthenticationMethod : Ntlm
    IISAuthenticationMethods           : {Basic, Ntlm, Negotiate}
    Clients using Outlook Anywhere only, not Exchange domain members.
    1. Windows XP SP3 (fully patched), Outlook 2007 SP3 + Nov 2012 Patch - When launching Outlook prompts for password only once.
    2. Windows 7 (fully patched), Outlook 2010 (fully patched) - When launching Outlook doesn't prompt for password.
    I'm aware of this:
    http://support.microsoft.com/kb/956531
    The goal - Eliminate issue with password prompts for Windows XP.
    Any chance resolving this? CU install? Anything else?
    Thanks.
    Memento Mori

    Hi,
    Based on my experience, the credential issue is mostly likely caused by authentication method.
    And I recommend the following troubleshooting:
    1. Change LmCompatibilityLevel on the windows XP client to a value of 2 or 3:
    a. Click Start, click Run, type regedit in the Open box, and then press ENTER.
    b. Locate and then click the following registry subkey:
    HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\
    c. In the pane on the right side, double-click lmcompatibilitylevel.
    d. In the Value data box, type a value of 2 or 3 that is appropriate for your environment, and then click OK.
    e. Exit Registry Editor.
    f. Restart your computer
    2. Reset the windows credential store.
    If you have any question, please feel free to let me know. 
    Thanks,
    Angela Shi
    TechNet Community Support

  • Exchange 2003 - Continous password prompts in Outlook 2010

    Hi. 
    A customer is experiencing continous password prompts in Outlook 2010. Outlook is configured against the Exchange 2003 BE server (FQDN) and Outlook Anywhere is configured to sync.customer.com with a valid 3rd party certificate. 
    Outlook is configured with Negotitate as Logon network security, setting this to basic/NTLM does not help. Connect to Microsoft Exchange using HTTP is set and configured with sync.customer.com, and msstd:sync.customer.com. All points checked except "On
    fast networks, connect using HTTP first, then connect using TCP/IP", authentication is set to Basic. Changing authentication from Basic to NTLM seem to make the problem vanish. 
    Outlook Anywhere is functioning correctly and only prompting once for password when connecting from an external network. ISA is not configured for NTLM/Kerberos.
    Exchange 2003 is located in main site in a resource domain. The prompts occur more often in two remote sites than the main site. 
    When opening Outlook RPCDiag shows established connection to BE and Active Directory, sometimes with prompt and sometimes without. After about 5 minutes the prompt may reappear, entering password does not remove the prompt, clicking cancel puts Outlook in
    the "Need password" state, clicking this usually successfully connect Outlook to Exchange. Other times this just cause the prompt to reappear. 
    I´ve tried adding the internal and/or external IP address of the ISA server as sync.customer.com in the host-file on a client and forcing RPC/HTTPS through the DisableRpcTcpFallback, still getting the password prompts. 
    We have also been through the KB975363, changing the MaxConcurrentAPI on all domain controllers. 
    Finally, we know Exchange 2003 is in a unsupported state so there is no need to comment this. 

    Hi,
    Firstly, I'd like to explian, basic authentication requires the user to enter domain, user name, and password. Thus, it's an expected behavior that the credential prompts once when the authentication is set to basic and it disappears when it's NTLM authentication:
    http://technet.microsoft.com/en-us/library/aa996225(v=exchg.65).aspx
    For the issue that the credential keeps prompting, I'd like to confirm if Outlook 2003 works well. If yes, you can refer to the following article:
    http://support.microsoft.com/kb/927612/en-us
    If all outlook clients prompt credential, you can check the RPC over HTTP connectivity by ExRCA:
    https://testconnectivity.microsoft.com/
    http://support.microsoft.com/kb/820281/en-us
    Thanks,
    Angela Shi
    TechNet Community Support

  • SQL script with a prompt functionality.

    Hello experts,
    I tried searching this on the net but was unsucessful...
    Bascially I need to update an sql script with a prompt functionality..Basically I would like a user prompt that would enter 'Yes or No' to compile invalid objects using utlrp.
    If Yes, it should compile it
    If No it should exit out...
    Can anyone please help.. Need to do this today.
    Edited by: user568296 on Oct 2, 2009 8:18 AM

    Hi,
    As someone suggested, you're probably better off doing this at the OS level.
    SQL*Plus does not have any good mechanism for conditional branching. One trick you can do in SQL*Plus is to run one script from another by saying <tt>@@filename</tt>. By using a substitution variable (which can be defined based on the results of a query) in place of a literal filename, you can make this dynamic.
    For example, the following script runs either
    recompile.sql or
    goodbye.sql
    based on the answer to a prompt:
    ACCEPT     recompile_now      PROMPT        'Do you want to recompile objects now?  '
    COLUMN     next_script_col        NEW_VAL next_script
    SELECT     CASE     
              WHEN  UPPER ('&recompile_now') LIKE 'Y%'
              THEN  'recompile'
              ELSE  'goodbye'
         END     AS next_script_col
    FROM     dual;
    @@&next_script<tt>@@filename</tt> assumes filename.sql is on the same directory as the calling script. You could also give a full path name using only one @-sign:
    <tt>@pathname</tt>

Maybe you are looking for

  • How to execute a shell command in java?

    here, my environment is redhat 7, jdk 1.5. i don't know how to use the shell command in java. i want to use this function: #include <stdlib.h> int system(const char * string); please give me some ideas. and Thank you so much if coming with a little d

  • Org.apache.jasper.JasperException: Unable to compile class for JSP

    Hi All, I have been using NetBeans IDE 3.5.1. AndI am trying to execute one JSP file, but it is giving error and i am not able to execute the servlet files also in NetBeans IDE. Can anybody help me out regarding this... type - Exception report messag

  • Autosolve during cube build

    Hello! Several days ago 14th of December 2008 we had run several cube builds. During these builds OLAP engine performs Data loading and Auto solve it was looking like this in XML_LOAD_LOG bq. +20:19:45 Running Jobs: AWXML$_2260_2120. Waiting for Task

  • Run NeroLinux 3.0 with lib32: possible?

    Hi guys, I've just installed Arch64 on my desktop computer (I have the 32 bit version on my Core Duo laptop). On the laptop I use NeroLinux 3.0 (beta) and I would like to use it even on my desktop. I tried the package in AUR and it works but the prog

  • Contacts are not correct

    I synched my iPhone to the Exchange server at work and now I'm seeing really weird issues with my contacts. For instance, my contacts are no longer correlating with the correct information (i.e. Bob's contact information is now Jan's contact informat