Creating a bash script problems with crypt

so for the past few days ive been working on a small project to install rclone and all the necessary files from a bash script including creating the remotes. and first off figuring it all out has been fun but also super frustrating.

anyways when i execute the command

rclone config create crypt crypt directory_name_encryption true filename_encryption standard password $encvar remote gdrive:encrypt it creates the remote. and it even shows the password as being encrypted as it should.

but if i try to rclone ls crypt i get: Failed to create file system for "crypt:": failed to decrypt password: input too short when revealing password - is it obscured?

so when i look in rclone config and edit the remote it shows the raw unobscured password. so my question is how do i fix this?

worth noting im on the latest rclone. and im on ubuntu 18.04

You need to use rclone config password remote password $encvar to set the obscured password in the config. So create the config first as you are but without the password then run rclone config password.

ahh so create the crypt without a password. basically remove the flags i have for password.

then im going to want to run rclone config password crypt password 1234 password2 1234

and that will set the passwords to 1234 and obscure them in the config correct?

Yes that looks correct.

Thank you. im glad to finally make some head way. the first 2 days i spent trying to figure out why it all wasnt working. when i wrote the commands i was adding the -- for the flags. found out i didnt need those then i found out i didnt need the -- or the drive prefix at all. then i faound out i had to change any dashes to underscores.

basically i was using --drive-client-id=x instead of client_id x with the rclone config command. i just assumed thats how they worked since thats how i put flags in for rclone copy and sync. i need to read better

hey i didnt want to create yet another forum post just for a simple question. basically my script is an installation suite. so im setting up onedrive now. and for the life of me i cant find out how to get my drive_id other than following the interactive prompts. and that kind of defeats the purpose of automating the whole thing.

i cant find any documentation on it anywhere and google or the forums yield nothing. sorry to bug you again ncw

I don't know the answer I'm afraid! @Cnly might though?

found it. when login and navigate to the onedrive location its literally in the URL

i dont mind sharing it here. its a throwaway account.

Hi, I saw the mention and your PM. Sorry for the delay but good to hear you figured it out.

And alternatively, if you have created an rclone backend for the same OneDrive before, you can get its drive_id in rclone's config file. That field is reusable. Yet another option may be utilising the Graph Explorer and send a request. The ID will be shown in the response.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.