Submitted by pcfreak30 on Thu, 01/01/2015 - 03:44
I thought you may find this useful as it seems to be a key to automating windows deployments.
chntpw
http://pogostick.net/~pnh/ntpasswd/
If you were to detect a windows system this could be used as the windows version of the passwd command for xem/kvm.
Happy New Years!
Status:
Active
Comments
Submitted by JamieCameron on Thu, 01/01/2015 - 13:49 Comment #1
Interesting ... but does that run on Linux? And can it access a virtual disk image?
Submitted by pcfreak30 on Thu, 01/01/2015 - 13:53 Comment #2
Yes, it only runs on linux. Found some rpm's on google too. For accessing disk, it takes files directly so the disk would need to be mounted, but I assume that linux password resets would do the same. It is open source as well so if you write c it can be modified.
The program appears to be in security distros like backtrack/kali as well.
Submitted by JamieCameron on Thu, 01/01/2015 - 20:17 Comment #3
Oh, cool. Although for this to be really useful to Cloudmin, it would also need to be able to SSH into the Windows VM, which means that some SSH server and/or Cygwin would need to be installed.
Submitted by pcfreak30 on Fri, 01/02/2015 - 03:16 Comment #4
Is it not possible to do a temp mount of the filesystem, and edit the hive with the account information. Thats how you would do this. Trying to apply unix methods to the windows world is not the answer.
Submitted by allitsk on Fri, 01/02/2015 - 03:41 Comment #5
SSH server or Cygwin is too hardcode solution. Using built-in solution of Windows remote console (something like SSH connection to linux console) is much better. I use linux program (included in many repositories) called WINEXE. Feature must be enabled be registry in Windows and allowed by built-in firewall (or other firewall - same as cloudmin connection to webmin), but it's opening full remote connection to Windows console by any user = cloudmin for example.
I can send windows commands to enable this feature, if You want.
Submitted by JamieCameron on Fri, 01/02/2015 - 14:49 Comment #6
Cool, I didn't know about that. So is this windows remote console accessible via SSH, or does it use a different protocol?
Submitted by allitsk on Fri, 01/02/2015 - 16:10 Comment #7
No, it not use SSH, but MS protocol. But using this by cloudmin scripts would will be same (for You propably easy) as SSH commands sending to Linux guests. Of course with windows commands.
Submitted by JamieCameron on Sat, 01/03/2015 - 13:37 Comment #8
I guess it would require some client for whatever remote shell protocol MS came up with that can run on Linux.
Submitted by allitsk on Sat, 01/03/2015 - 13:49 Comment #9
As I wrote, it's need program winexe, example of usage (and very easy compile) here: http://secpod.org/blog/?p=661
But compilation is not necessary, for example in Ubuntu can be installed from repo: apt-get install winexe
Something about protocol: http://serverfault.com/questions/521371/winexe-how-winexe-perform-login-...
Submitted by pcfreak30 on Sat, 01/03/2015 - 13:52 Comment #10
There is a fault here. How can you login to the admin account to set the pass if you dont know it in the 1st place. You have to use ntpasswd program + NTFS mount to do it so you don't need to know the active password.
Submitted by allitsk on Sat, 01/03/2015 - 16:10 Comment #11
My fault, sorry. I added my opinion about changing password when system is connected to Cloudmin already (like SSH or Webmin status for Linux).
Of course, this not supply ntpasswd program in installation process (for example by system image).
Probably I had to create a new feature reqeust.