How can I enable app permissions via ADB command? Also, can I enable restrictive mode permission for an app? - adb

How can I enable app permissions via ADB command? Also, can I enable restrictive mode permission for an app?
I want to remove manually steps from the pipeline.

Related

The Secure ADB mode is enabled

After I connected the device with the ADB tool, I entered the ADB command to prompt the following information:
"The Secure ADB mode is enabled. Please use the GM Secure ADB Client tool to authenticate first."
May I ask how to solve this problem

Enabling AAD login for existing Virtual Machines

I have seen that AAD login can be enabled at the time VM creation -- when we do this, I noticed that it adds an extension someething like 'AADLoginForLinux'. But for the VMs for which we don't specify AAD login at the time of creation, how do we enable it? Can we go to the extension blade and just search for 'AADLoginForLinux' extension and install it (if available for the selected OS) ? Will that make AAD login work for the VM?
Of course, it's possible to install VM extension for the existing VM which does not enable the AAD login in the creation time.
For Linux, you can see all the support distributions and regions here currently. Not long below, you also can find the steps that how to install the VM extension for the existing Linux VM.
For Windows, you can find the steps here. But it seems only the Windows Server 2019 Datacenter and the Windows 10 1809 and later are supported currently. See more details here.

Cannot add users to ACL from Windows on a SMB share because windows uses wrong username to login to LDAP

I have a running Samba as Active Directory Domain Controller with shares. I have Windows 10 clients. These clients have Windows Home edition so they cannot join the domain. What I want is to be able to access the share from windows using specified credentials and the ability to edit ACLs from Windows.
So far I can connect to the share and create files inside of it. I can also set the ACL from linux. I can also edit ACL from Windows for users that already have some permissions. (Are visible in the permission window on Windows).
What I cannot do is to add permission to an existing user from Windows. The Windows is trying to find the user using wrong credentials (when adding the user to ACL). Windows is using its hostname as username to login to the LDAP server (managed by the same Samba instance) instead of using the username that is logged in to the share.
I have confirmed this weird behavior using Wireshark.
My domain name: PRESTOL
User with access to the share: PRESTOL\Administrator
The actual user windows is logging in while trying to find the user: Hostname of the windows machine.
Is there a way to force the windows client to list the users using the user accessing the share (PRESTOL\Administrator) instead of the client hostname?
Thank you.

Windows command to grant folder permission to SQL Server from Inno Setup

My Java application periodically bulk-inserts into SQL Server. So I will need to grant file system permission to SQL Server. I am able to do this manually. I wonder if there is a Windows command to grant permission to file system. I would like to use that in my Inno Setup file.
Inno Setup has a built-in feature for changing permissions of directories, Permissions parameters of [Dirs] section:
[Dirs]
Name: "{app}"; Permissions: users-full
It will create the directory, if it does not exist yet.
See also Inno Setup - How to set permissions of installation folder.
To answer your actual question: You can use icacls. See Inno Setup change c:\ permission.

Enabling Azure Remote Desktop

I accidentally turned off Remote Desktop access on a VM instance in Azure. Is there a way that I can turn RDP access back on through the portal, PowerShell, etc. ?
Before you start your VM on the portal, follow these steps
Select the VM, go to the dashboard
Click on the Endpoints tab and choose RDP from the list of endpoints provided
Once the RDP is selected, it gives you the default port number, use as is and save changes
http://azure.microsoft.com/en-us/documentation/articles/virtual-machines-set-up-endpoints/
Start your VM, then you can RDP your VM.
Enabling RDP using Powershell, check the below link
http://blogs.msdn.com/b/sriharsha/archive/2013/10/26/remote-powershell-in-azure-iaas-virtual-machines.aspx
http://azure.microsoft.com/en-us/documentation/articles/cloud-services-nodejs-enable-remote-desktop/
Hope this helps
Girish Prajwal

Resources