gsutil ch command won't let me add a user - google-cloud-storage

From reading the documentation, I feel I have correct syntax but I can't add a user to have write access to my bucket. Can someone explain to me what's wrong with my setup?
$ gsutil acl ch -u [email address of person I want to give access]#gmail.com:WRITE
gs://[bucket name]
CommandException: Received bad request from server: BadRequestException:
400 Invalid Value

Your command is fine, thus your email address is incorrect. Can you try it with another email address?

Related

setting up teleport - Configure Domain Name and obtain TLS certificates using Let's Encrypt

ok so what I want to do is set up teleport on a remote machine so i can access it over the internet. I am following the tutorial but I am no expert on any of this stuff. i try to copy paste the commands from here:
https://goteleport.com/teleport/docs/quickstart/
section 1c:
certbot certonly \
--manual \
--preferred-challenges=dns \
--agree-tos \
--manual-public-ip-logging-ok \
--email foo#example.com \
-d "teleport.example.com, *.teleport.example.com"
i changed the email and domain name, as it says in the tutorial, but the it asks me to :
Please deploy a DNS TXT record under the name
_acme-challenge.teleport.example.com with the following value:
XXXX
how am i supposed to change that? and where?
thank you!
When choosing --preferred-challenges certbot will ask you to confirm you own the domain by placing a TXT record. You can do that if you own the domain and you can access the configuration.
You want to create your own domain (check Freenom to obtain one at no cost) which you have full control on and you can add the TXT record.
Here is a reference to Create DNS records at Freenom for Microsoft

Sending mail with curl on Windows via MS Exchange Server

I am trying to send an email using curl on Windows 10 through an MS Exchange Server. The email is sent to another user in the same Active Directory domain, and the user who is sending the email is already authenticated under Windows.
Given the above, I can successfully send an email using telnet as follows:
or PowerShell as follows:
Given that the above two commands work, I am looking for the equivalent curl command. I have looked at the following SO answer:
Using curl to send email
and tried the following command (and many other combinations of options), but with no success.
curl -v --url "webmail.jXs.com:25" --mail-from "r#jXs.com" --mail-rcpt "s#jXs.com" --upload-file mail.txt
I get the following output:
where the mail.txt file is:
So, what is wrong with my curl command? Thanks.
Apparently when using curl, we have to specify the smtp communication protocol in the url (which is not necessary when using telnet or powershell). So, adding smtp:// to the url made the curl command work.
curl -v --url "smtp://webmail.jXs.com:25" --mail-from "r#jXs.com" --mail-rcpt "s#jXs.com" --upload-file mail.txt

Twilio Verify API verification call return curl error

I am now trying out the Twilio Verify API and the guides actually showed there are only two calls to the API to send the OTP to the target phone number and check if the OTP entered by end user is correct or not. I have problem with the verify code part, which return the curl error.
The OTP is successfully sent to the target phone.
This is the curl command i used to check the OTP:
curl -GET 'https://api.authy.com/protected/json/phones/verification/check' -d api_key=xxxx -d verification_code=xxxx-d phone_number=xx-d country_code=xx
This is the error message:
curl: (58) could not load PEM client certificate, OpenSSL error error:02001002:system library:fopen:No such file or directory, (no key found, wrong pass phrase, or wrong file format?)
Sorry for not reading the error message properly, I fixed it already by add the SSL cert path and private key path of the server to the curl command and it works.
curl -GET 'https://api.authy.com/protected/json/phones/verification/check' -d api_key=xxxx -d verification_code=xxxx-d phone_number=xx-d country_code=xx --cert path/to/fullchain.pem --key path/to/privkey.pem

I can’t login to the server as the user I’ve created

I got “Permission denied (publickey)" using:
ssh $USERNAME#my-ip
Things I’ve done:
Using Public/Private Key authentication, I can login to the server as root.
I created a user in the sudo group
I confirmed that my created user has sudo priveleges as I viewed auth.log successfully (sudo cat /var/log/auth.log)
I thought it was possibly because my server was unable to identify which key to use, as I have created multiple keys, so I specified which key to use:
ssh -i /path/to/key/id_rsa $USERNAME#my-ip
I got "Permission denied (publickey)" again.
I figured it out! Turns out I was missing an 's' in 'ssh' at the beginning of my authorized_keys file in my user. :) I also matched the permissions between the root and user authorized_keys files, though not sure if this helped truly.

AWS: Not able to retrieve mail logs using putty. Getting permission denied error

I am working on getting the error logs for mail.
The path .. /var/logs/ -> mail
But view the file i am getting permission denied error. please help me to know how to retrieve the mail logs.
Thanks
Type 'sudo' before your cat or less command. You need to elevate to root permissions.
sudo less /var/log/maillog