Windows 7 Forums

Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: runas administrator from cmd, error RUNAS ERROR 1327 Logon failure

19 Jul 2016   #1
Snukye

Windows 7 x64
 
 
runas administrator from cmd, error RUNAS ERROR 1327 Logon failure

Hello,

Recently I have installed on a Virtual Machine Windows 7 so I can run automated builds on it with Jenkins.
The problem comes here : I need to launch a .bat script from cmd, but as an administrator.When I try to do that, I get the error :
Quote:
RUNAS ERROR: Unable to run - *path to my file*.

1327:Logon failure: user account restriction. Possible reasons are blank passwords not allowed, log on hour restrictions, or a policy restriction has been enforeced.
I have been looking on the internet and found here a solution, but sadly, I do not have
HKLM\System\CurrentControlSet\Control\Lsa\limitblankpassworduse
Would be there any way I can run my script, remotely, as an administrator?

Thank you!


My System SpecsSystem Spec
.
20 Jul 2016   #2
Eric3742

Windows 7 x64
 
 

This require you to clearly indicate which folder is that file.bat come from.

cmd.exe C:\Win7\temp\file.bat

It require the full path name.

Hence you need these steps.
1. Touch on the WIN key.
2. in the bottom where you need to input cmd.exe C:\Win7\temp\file.bat
3. This will show on the top.
4. Right-click and select Run as administrator

In this way, you are in the administrator mode.
My System SpecsSystem Spec
21 Jul 2016   #3
Alejandro85

Windows 7 Ultimate x64
 
 

If that key don't exists of course you have to create it, and give the proper value (non existent values assume a default).

But something else bothers me much more. An administrator account without a password is a very serious mistake. A better solution is to give a it password, so you gain security too.
Yet another possibility, with security implications, is to run Jenkins with an administrator account instead of a limited one, so you don't even bother with runas.
My System SpecsSystem Spec
.

21 Jul 2016   #4
Eric3742

Windows 7 x64
 
 

Quote   Quote: Originally Posted by Alejandro85 View Post
If that key don't exists of course you have to create it, and give the proper value (non existent values assume a default).

But something else bothers me much more. An administrator account without a password is a very serious mistake. A better solution is to give a it password, so you gain security too.
Yet another possibility, with security implications, is to run Jenkins with an administrator account instead of a limited one, so you don't even bother with runas.
Quote:
:
RUNAS ERROR: Unable to run - *path to my file*.

1327:Logon failure: user account restriction. Possible reasons are blank passwords not allowed, log on hour restrictions, or a policy restriction has been enforeced.
Most likely, Logon failure due to password, as Alejandro85 mentioned.
Password cannot be Null, empty, blank, etc.

Playing on Registry require some knowledge, as 1 wrong move &or location, the PC may crash, etc;
Whatever changes made, it will take immediate effect, that is "Live".
Something like this: create Dword: limitblankpassworduse (must be full, as it is)
Then the Value: 0 or 1 (numeric digit) as it mean Yes or No &or True or False
Advice you not to do this, as it is just an example.
My System SpecsSystem Spec
25 Jul 2016   #5
Snukye

Windows 7 x64
 
 

Thank you, guys, for your interest and help Funny, I managed to solve it in a tricky way (I'll explain at the end).

Not to forget: looks like there was a 'limitblankpassworduse' file in regedit, but I did not see it at first ( I was looking for LimitBlankPasswordUse...)
And regarding the security, there is no need for it, as the VM's location is on a linux server, inside VirtualBox (from Oracle) and only those with root privileges can acces it. ( so, I should not worry about security, right?)

Now, the tricky way:
  1. Firstly, I had to disable UAC (start->UAC->lowest point possible)
  2. Secondly, I created a shortcut to that file and set it to run as an administrator (Properties -> Run as administrator)
  3. Instead of sending the path to the main file (.bat), I used the path to the shortcut (.lnk)

Thank you again for your interest
My System SpecsSystem Spec
Reply

 runas administrator from cmd, error RUNAS ERROR 1327 Logon failure




Thread Tools Search this Thread
Search this Thread:

Advanced Search




Similar help and support threads
Thread Forum
CRC Error..HDD failure or Windows failure?
I have seagate hdd with windows 7 ultimate installed on partition C and the partition D for data. Suddenly while booting, windows ask me for disk checking volume/partition D for consistency. If i let it check, the utility will run for endless time stucking at 6% mark . If i cancel the disk...
General Discussion
How to automatically run a shortcut with "RunAs" w/ credentials
WHat would I need to put in the target field of a shortcut properties in order to automatically run as a diff user? (Instead of holding down shift and right clicking on shortcut and selecting RunAs different user.) I am trying to run remote assistance as a diff user and I added /runas...
General Discussion
Error:1069 Service Not Started because of Logon Error
I've been trying to TVersity to access my NAS. I set the service to use the same user as the admin but I try to start the service I keep getting a 1069 error. Am I missing something on setting the service to use a specific account?
Network & Sharing
UAC bug with runas from command line?
Hi Folks, I am experiencing what I believe is a bug with UAC in Windows 7. I would like to see if anyone can recreate this issue and tell me if it is a bug or is working as expected. To recreate the issue: 1. Confirm the following local security policy setting is Enabled. Local Policies...
General Discussion
Trying to access computer in workgroup, getting error "Logon failure:"
So here's my problem: I just set up some new Windows 7 Professional 32 bit machines in this office. Currently, the network type is set to Work, and all computers are a member of the same Workgroup, and Password Protected Sharing on the computer being used as a server is set to "Off". I've run into...
Network & Sharing
Error 1327 invalide drive L:\
Hello! I have a home network with 3 pc's connected together in a Lan network. One Pc is server and is in the basement and contains the userfiles of the two other pc's. The 3 pc's is in the same homegroup. On my pc I have a mapped drive L:\ which is on the server. I have moved my favorites to...
Network & Sharing


Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App