net use command asking for a username and password - authentication

Azure Files SMB Access On-premises with private endpoints, But when I used the net use command to mount the drive.
c:>net use Z: \myshare.file.core.windows.net\testshare
its keep asking username passowrd
Enter the user name for myacc.file.core.windows.net':
Thanks
Shanuka M
Azure file share with On-prem AD Authentication

Net use command fails if the storage account contains a forward slash
Try the below mentioned cmdlet
New-SmbMapping -LocalPath z: -RemotePath \\StorageAccountName.file.core.windows.net\sharename -UserName StorageAccountName -Password "AccountPassword"
This article will help in Mapping a Network Drive to an Azure File Share Using Domain Credentials
I would recommended to please refer the Prerequisites : on-premises Active Directory Domain Services authentication over SMB for Azure file shares

Related

Azure File Shares drive map password prompt

I'm having a problem mapping a file share on Azurefiles using Active directory authentication.Storage account already connected to on premise domain and i have a hybrid domain setup.
File share can be mount using the storage account key without any issue.However, when i try to map the share from a domain joined account without storage account key it gives the following error.
System error 86 has occurred.
The specified network password is not correct.
The AD user account was already added to "Storage File Data SMB Share Contributor" role as well.
Based on the error message you can refer to the suggestion mentioned here Error 86 Specified password is incorrect
Active Directory authentication over SMB for Azure file shares: https://learn.microsoft.com/en-us/azure/storage/files/storage-files-identity-auth-active-directory-enable#mount-a-file-share-from-a-domain-joined-vm
Azure Active Directory Domain Services authentication on Azure Files:ht tps://learn.microsoft.com/en-us/azure/storage/files/storage-files-identity-auth-active-directory-domain-service-enable#mount-a-file-share-from-a-domain-joined-vm
For additional information please see here also, which gives an idea on your query
Troubleshoot Azure Files problems in Windows

Azure Container Registry without Pull authentication (ACR Pull Role)

I have Azure Container Registry instance, where the container images are pushed. We have ACRPush role to some crdentials(service principal account)
Can we pull the images from the ACR without any authentication. We want to make this publicly available to pull images without any docker login/authentication.
Regards
Jayashree
I think there are some things you need to understand carefully. First, the ACR is a private registry, so you must have the credential with the right permission to push and pull images. Second, the docker login is just a method to set the credential for the registry, so it's not necessary.
According to the above things, you do not need to run docker login command, but you must have a credential for the ACR. You can run the Azure CLI command az acr login --name acr_name and this command will set the credential for docker without running docker login.
Using Azure CLI, you can update the registry to allow anonymous pull using
az acr update --anonymous-pull-enabled ...
https://learn.microsoft.com/en-us/cli/azure/acr?view=azure-cli-latest#az_acr_update

How can i write to shared folder through Process running with LocalSystem account

I have WCF Service hosted with "LocalSystem" Account, This will create zip file which needs to be write to network share path(Eg:-\INGBTCPIC3xxx\Shared Folder)
I use File.Create() Method to create, But it throws an Exception System.UnauthorizedAccessException: Access to the path is denied.
I know that folder has to be shared to write to it, Please let me know with which user folder needs to be shared. Because in my case WCF service is configured to run under LocalSystem a/c
Please suggest some idea
Thanks in Advance
The domain seems to different for the account which is running WCF service and the shared location.
You can use impersonate to resolve this issue: Write to a Directory as a Specific User on a Different Domain
or use as batch command:
net use /user:username password
And then use File.Create method to write the file.
Finally, I learned how to share folder to a LocalSystem Account i.e. share with hostname of system on which WCF service is running rightclick folder-->Properties-->Sharing-->Share-->Type Hostname followed by $(xxxx$) and give Read\Write access

Save and access file from shared drive

I am running a file upload process to upload files to a db. The web server and the SQL server are different machines. I am attempting to use an SQL OPENROWSET to upload an excel file, but I cannot determine how to get the file onto the other machine. Is there a way to set up a shared drive that the web server can save a file to and the SQL server can access? We have a local network set up with Active Directory.
For Example:
WebServer - Shared drive on web server under C:/inetpub/webpage/fileImport
SQLServer - Will log in with sql auth using USERID and PASSWD. Needs to access webserver shared drive.
What user do I share the drive on web server with so that the sql auth user will be able to access it when I run the OPENROWSET?
Any help will be much appreciated.
I am also trying the same thing by uploading the file in FTP and trying to access it. But i didn't get any progress from last 2 weeks.
And i had found may other alternatives like coping the files in another server and share the folder with out user name & password. then we can able to access it by giving the
\\folder\filename
If u get any other alternative plz share...
You should setup a new user that has access to the user group iis_users, and then give them security access to the file drive itself.
The same should be done to the DB server, and on the drive folder security the other user will need read/write/Modify permissions.
So it will look like:
(WebHost) ---- (Shared) ---- (DBHost)
*-------*
Well, you would setup the folder on the SQLServer.
Create a secure user on the SQL machine.
Make the folder shared (with modify rights for the secure user)
Map the Network drive on the Windows machine, using the secure user to access it.
Your main user on the SQLServer should then be able to openrowset from the local folder, whilst the IIS Server is remotely accessing it.
Using the OPENROWSET means that SQL qill access files using the service account. This account must be used to access share drive, as stated here Using SQL Credential to Open a file with OpenRowSet.

Cannot change files permissions on server. Could this be because my site does not have a domain name?

I am developing a site for a client who has not decided on their domain name yet. I set up an account on a web server via WHM but have not pointed any domain names to it.
All was going well until I used a plugin (TinyMCE) to try and browse files on the server - it wouldnt work so I had a look at its script files and realised their permissions are set to not executable (644). I tired to change it to executable (755) but I get an error in my FTP clients console:
550 Could not change perms on file.js: Operation not permitted
Could this be because I am accessing the server not through a specific FTP account and so the server has locked down the files?
EG: I am using the servers IP address to access files with my FTP rather then something like:
ftp.mysite.com
Any advice on this would be great! Thanks
Yes, There is an issues with the FTP account permission. You will have to login your server with the main cPanel account user name and password OR you can chnage your file permission through cPanel >> File manager