Is there a way to use the cdk construct for Amazon Workspaces to also create the workspace user? - amazon-workspaces

I'm using cdk to create an Amazon Workspace, however it seems that if you are using simpleAD then the only way to create a user is when you are creating a new workspace. The problem with that is if the user does not already exist, then you cannot create a workspace for them. Clearly that's an issue, because I need to create a new user for each workspace but I can only create a workspace after the user is created and I see no option in the cdk construct for creating the user for the workspace.
anyone know of a solution for this? it seems i am at a "chicken before the egg" problem.
Edit: I see that you're also able to connect to a Windows instance as Administrator and create users via "Active Directory Users and Computers tool" - but that's a pretty bad approach for someone who's trying to automate user creation.

Related

macOS. Replace application in Shared folder with admin priveleges

Our app is being stored in /Users/Shared/OurAppData/OurApp.app.
One of the reasons for this is to enforce user to use launcher.
But, now we've met the problem, when we want to update our app through the launcher(we download zip file, extract that and that wants to replace our app with the new one with)
try FileManager.default.replaceItemAt(URL(fileURLWithPath : Paths.ourAppPath) , withItemAt: extractedURL)
"You don’t have permission to save the file “OurApp” in the folder “ OurApp Data”."
My question is - is there a way to handle that situation?
I guess the best solution to promt user for login and password for permissions, and to replace that file? I guess this is something outside the Swift scope, and probably AppleScript, or even .sh.
Please, help.
Thanks
I recommend to have a look at the Sparkle framework for updating applications.
Sparkle handles the checking if an update is available, downloading the update, asking for an administrator password if required, and cleaning up the downloaded files after the update.
For most application it is enough to just have the new version archived as zip archive.
But it is also possible to update application with helper applications or agents which are outside of the main application bundle.
This can be done with installer package *.pkg. If you are familiar with Sparkle, the "Automatic installation" referred here will only show the Sparkle UI. In the background it will use macOS’s built-in command line installer, /usr/sbin/installer.
In most cases it will make sense to have the same .pkg as user facing installer and update, it is not required.
If your application is sandbox, there are a couple of forks of the framework.

AppSrv01 doesnt have write permission

i know that the default profile name when i installed websphere was Appsrv01, I want to create my own AppSrv02 but the location of my IBM Websphere was in C: and i dont have any write permission, i dont have any admin rights also..
using COMMAND-LINE, I want to make my profile folder to be writable, so that my newly created AppSrv02 will be list down in the profile names in my RAD.
Please help me. Thanks
So that's your problem. In order to have a usable profile in WAS, your user must have write permissions. See this link from WAS ND infocenter, it applies to WAS standalone too.
http://www.ibm.com/support/knowledgecenter/SSAW57_8.5.5/com.ibm.websphere.installation.nd.doc/ae/tpro_manage_nonroot.html
If you cannot change the write permissions to this profile, you'll need to create your own. For this, you can either use WAS Profile Management Tool, WAS CLI or you can create your profile using the Configure profiles... link in the WAS server creation wizard you posted. I'd use the RAD way because RAD validates, within the IDE, the proper permissions that you need to create and use the profile within RAD.
First check whether you have admin rights or not if your using User/Guest profile, by creating any new folder in C drive where IBM WAS is installed.
If you have Admin rights, than right click on RAD run as administrator. It should work fine.
If Profile doesnt show up in drop down, Configure new profile and try checking that way.
If you dont have Admin rights better install RAD in any local drive other than C
Running Eclipse with Admin rights and removing the read-only tick for the AppServXX folder/WAS folder couldn't help me... cause I copied the WAS server from another PC :). So for those of you who want to move / migrate your development environment:
I did a search inside the copied WAS, Eclipse and the project's workspace folder for their old paths (with Total Commander, feed the results into a list) and dragged all the files (except the log ones) into my editor (NotePad++) and did a replace in all open documents for the new paths. It's a bit lucrative, but it took only 10 minutes for me and afterwards the WAS server in Eclipse showed the correct profile and it also did start up well.

Deleting files on remote server

I have a PHP project in NetBeans with remote files (over sftp). When I create, modify anything these changes happening both locally and on my web server. However when I'm trying to delete a file or a folder it gets erased only locally. What could be the problem?
Permissions seems to be ok, all files belong to the user I'm using to access the server.
I'm using Netbeans 6.9.1, default configuration, all updates installed.
Netbeans does not have a synchronization function. It is limited to downloading and uploading files. What you can do is to use some external tool, for example WinSCP is capable of synchronizing local and remote directories.
I read what you wrote... but I think it could be a permissions problem.
I also use NetBeans and when I delete a file from the project window it first erase it locally and then syncs with my server.
I login through sftp (using vsftp) as root, which is a bad thing, but you could try this too to be sure if it's a permission issue.
You mistakenly turned off the settings. Please follow these steps:
Right click on the project name
Select properties
From the list of the left select 'Run configuration'
On the left almost down, look for the setting 'Upload files:'
Make sure you set that to 'On Save'
All the best man

Access a locked folder

Ok so my supervisor is currently testing something with Windows Permission Settings for folders, basically setting who can access it and who can't. He wants me to find out if I can get in, without permissions.
Basically checking how secure this method is to protect a folder from unwanted access.
So my question is, Is it possible to get into the folder without third party software?
Please note: I am NOT asking how to do this, just want to know if it is possible.
Since all file access is performed through Windows, Windows permissions will be respected for any attempt to access a file.
To access the file without using Windows, you could boot on a Linux CD, but I suppose that would qualify as "third party software" in your question.
If a user has sufficient permission on the parent folder, the user may be able to modify the permissions on the folder you're trying to protect. This would generally only be available to someone with an admin account.
Aside from the above caveats, the Windows Permissions settings are perfectly secure.

SQL CE deployment

I have a small windows app and am trying to use SQL CE for the local datastore. I have had a couple of problems deploying it. I am using ClickOnce deployment.
First question:
In the Publish properties -> Application Files I have it set to Data File(Auto), Required, Include. However, it doesn't seem to be included? When I navigate to the location that Click Once installs to its not there?
Second:
Click once creates a new directory in the User\Local\Apps directory, with the app files and SDF file in when I update the app and release a new version I don't want to start with a new database. All the data in the existing database will be lost? The just doesn't seem to make sense?
What is the procedure around this?