How to get Remote User Credentials in TwinCAT XAE of Target System? - twincat

How can I get the password for the Remote User Credentials in TwinCAT XAE.
Context:
I have TwinCAT XAE in development PC-Windows and I have TwinCAT XAR on another PC-WINDOWS which is my Runtime PC. I want to connect both these PCs via Ethernet/IP to shift my code from development PC to my Runtime PC.
I have done the TCP and UDP settings for the runtime PC already.
The Development PC is detecting the run time PC in the select target/System window. But, I am un able to connect them because I don't know the password of the remote user for the remote user credentials window. I have tried the password of the runtime PC (which a PC asks when it starts) and also the default value 1, as mentioned in some of the online videosenter image description here

You need to enter the credentials for an administrator account on the PC. The default username/password of "Administrator/1" only applies to factory default Beckhoff PLCs, and not your Windows PC that you have created yourself. To solve this issue, simply create an account called "Administrator" on the Windows 10 PC running the XAR and set a password of 1.

Related

How do I fix a "The requested session access is denied" error for Microsoft Remote Desktop?

I have a Windows Server 2012 R2 instance running in VirtualBox. Within this VM I have two users, Admin and vagrant where vagrant is non-administrative.
When interacting into the VM via VirtualBox, I am having no issue connecting into either Administrator or vagrant. But when I use Microsoft Remote Desktop, I can only login to the Administrator. As I attempt to login as vagrant, I keep getting the following
The requested session access is denied
According to this potential solution, I have to "Remove the /admin parameter in the remote desktop connection". I have no clue on how to go about that.
Any feedback on this is much appreciated, Thanks!
Try opening the remote desktop application "fresh". Make sure you are not using a saved shortcut to login with the admin account.
Make sure vagrant is a member of the windows "remote desktop users" user group. Under user accounts on the target VM.

Windows xp remote shutdown

I m a computer teacher in computer lab. I have approxly 30 pc in lab.
I want to enable remote shutdown in all pc.
I have all pc's admin rights. There are no domain in lab.
So I write all pc ip's in one text file.
I used "shutdown -i" command and copy all the ip's and paste it to windows.
But some pc not showdown and some properly shoutdown.
There are access denied error display for some pc shutdown.
My question is I want to make one universal .reg file, that I want to run in every pc and enable remote shutdown in every pc.
Every pc run Windows xp sp3.
There are no registry settings that you can tweak in order to enable remote shutdown.
You just need to provide the correct set of login credentials with the command. But as there is no possibility to send a username and password with this command, you have to do a little trick:
Connect a network share from the remote computer using an user account from the remote PC (also IPC$ works). By doing so, you have authenticated to this PC for further operations. After that, you can send the shutdown command.
I am using it successfully in the exactly same way as described here in a C# program.

Debug VMWare Process with Visual Studio: Login Failed

From a Windows7 host, I have a process running under a Windows10 VM from VMWare. Using Visual Studio 2013 and the VMWare remote debugging plugin, I want to attach to this process. When I try, I'm prompted for my Username and Password but after entering such, I get the error:
Login Failed. Authentication failure or insufficient permissions in
guest operating system.
The "Attach to Process" dialog has the correct "Running Virtual Machine" and associated "Virtual Machine Location". The "Remote Debug Monitor" is set to the path on the host of ...\Remote Debugger\x86\msvsmon.exe. The "Remote Debug Monitor Name" is set to "VMDebug".
My Win7 host is part of a domain but the Win10 guest is not. They have different passwords. I am able to do remote-debugging on a Win7 VM that is also on the domain. There I connect as "COMPANY\bcwhite" with my password that is the same as the host.
The first obvious question is: What is the correct "User name" because Win10 doesn't make this obvious? Is it "Brian White", "bcwhite", or "bcwhite#example.com"? Granted, I've tried all three and always get the same error.
The second question is: What other permissions could the guest operating system need? How do I get more information?

Kernel debugging on host machine under user account

I'm trying to setup environment for kernel debugging and use KMDFDrv sample. Host - win 7 x64 wdk 8.1 vs2013RC, target - win8.1 x64 clean installation (no VM).
Both machines in the same workgroup, both firewalls down, UAC on target down.
User and Admin accounts use same passwords. On target WDKRemoteUsers is also created.
When I'm logged on host as Administrator - no issues. When I'm logged on host under user account I see that in "debugger immediate window" everything stops after reporting "Pass" status for actions that been just made - "driver removal x64", "driver preparation", "driver install", "Driver post install". Code compiled correctly for x64, win 8.1.
I'm not getting kd input window, only "debugging is running" msg.
Attaching to kernel on target also fails under user account. kd doesn't appear.
Initially target machine was provisioned and setup from host using user account. Then under Admin account in VS on host I also added target machine without provisioning.
Is there anything I'm missing? Can I do kernel debugging on target when logged on host under user account?

Remote Debugger over internet (Remote IP machine)

My setup:
Local PC: x86 vista & visual studio
Client server: x64 server ( static ip ).
Currently I connect with it using Remote desktop. Remote Debugger is running as service and there is a user name with login as service privilege.
Can I configure remote debugger to this setup?
Guides, experiences will make my life little less of a hell. Thanks.
I had a similar problem, and like Hans Passant said above, a VPN is necessary. I was able to attach to the process and debug over the internet by doing the following:
Install the latest microsoft remote debugger on the server.
Install Hamachi on both my local machine and the server and connect so that I was on the same network.
Go to Debug->Attach To Process on my local machine's Visual studios and enter the Hamachi IP address of the server.
Pick "show processes from all users" and pick the process in question.
Note: I was logged in as the exact same user on both machines and had the same password on each.
I hope that helps someone out there.
There's no way to channel your debugger to work over Remote Desktop.
Check out How to: Set Up Remote Debugging, specifically the "Configuring the Windows Firewall" section. You will need make sure you can connect to the correct ports, which will require Software and/or Hardware firewall changes. A VPN could be part of the solution (as #Hans Passant suggested in his comment).
A simpler answer may be to install Visual Studio on a machine within the same network as where you're trying to debug. Then your debugger is making a local connection and you are still interacting with the remote network via Remote Desktop. I'm not sure if this is an option.
For me it just worked over a public ip address. Ensure Visual Studio remote tools will open firewall ports for all relevant networks when installing. Also ensure the connection target public IP address is written with the TCP port (the default for VS2019 is 4024) when listing processes.
No 3rd party apps needed!
(I advise to follow this tutorial, especially the bottom part titled "Set up the remote debugger"). However, to say shortly, after installing Remote Debugging Tools on remote machine, run it with administrator privilegges and then:
Open up Windows Firewall settings page
Click Advanced Settings and there will show up such window:
Click Inbound Rules->New Rule and choose on the following pages:
- [Rule Type] Custom
- [Program] Specific program (and choose : C:\Program Files\Visual Studio\Common7\IDE\Remote Debugger\x64\msvsmon.exe or whatever is your correct path, also note x86/x64 your desired route)
- [Protocol and Ports] Skip that page by clicking Next (or for maximum security, you can actually choose the exact port that Remote Debugger window is showing)
- [Scope] Choose in the second field (where it says Which REMOTE IP..) your current IP address
- [Action] Allow connection
- [Profile] Next
- [Name] whatever slug you want to identify, i.e. My rule for VS
The last step what you might need, is to set the Junction (hardlink) for folder on remote machine to correctly resolve the application files:
* When connecting with Remote-Desktop, share drive from Local Resources > More > Drives > C
* After you connect, on remote "My PC" there will appear your "mapped drive" and copy it's location (i.e. \\RobertoPC\). Then open CMD with admin privilegges and execute:
mklink /D C:\my_folder \\RobertoPC\C\my_folder
On your local PC C: drive create a folder my_folder and put the project into that folder, and run the project with remote debugging option:

Resources