Solved runas administrator from cmd, error RUNAS ERROR 1327 Logon failure

Snukye

New member
Local time
8:37 AM
Messages
7
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 :
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 Computer My Computer

Computer type
PC/Desktop
OS
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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba L630 and L735
OS
Windows 7 x64
Hard Drives
240 GB SSD
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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba Sattelite A665-S6092
OS
Windows 7 Ultimate x64
CPU
Intel Core i7-740QM
Memory
8 GB DDR3
Graphics Card(s)
NVIDIA GeForce 330GT
Screen Resolution
1366x768
Hard Drives
Samsung 840 SSD 500GB
1TB USB3 external HD
Cooling
Coolermaster Notepal U3 notebook cooling pad
Internet Speed
3mbps ASDL
Antivirus
ClamWin 0.98.7
Browser
Opera 12.17 x86 (main), Firefox 38 (sec), IE11 (last resort)
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.

:
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 Computer My Computer

Computer type
Laptop
Computer Manufacturer/Model Number
Toshiba L630 and L735
OS
Windows 7 x64
Hard Drives
240 GB SSD
Thank you, guys, for your interest and help :D 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 Computer My Computer

Computer type
PC/Desktop
OS
Windows 7 x64
Back
Top