Skip to content

Make rclone config passwd act as sudo passwd #3386

Closed

Description

@jtagcat

Output of rclone version

rclone v1.48.0

  • os/arch: linux/amd64
  • go version: go1.12.6

Currently, when you use rclone, you need to enter the passwd every time. Could it maybe act like the sudo password, that it will be stored for x minutes in the terminal window? I'd actually prefer it stored until the window is closed.

Activity

  1. ncw commented on Jul 29, 2019

    @ncw
    Member

    You can do this with a small shell script or an alias

    alias rclonepass='read -s RCLONE_CONFIG_PASS; export RCLONE_CONFIG_PASS'
    

    just run rclonepass to read the password into that environment variable and it will last for the duration of the terminal session.

  2. jtagcat commented on Jul 30, 2019

    @jtagcat
    ContributorAuthor

    I wish that could happen automatically before an rclone command is ran. I haven't done go before therefore I opened an issue.

  3. ncw commented on Jul 30, 2019

    @ncw
    Member

    sudo works by keeping an on disk database of things in /var/run/sudo I think. Rclone would have to do something similar to make this work exactly like sudo, and it would have to actually store the password on disk. I'm not dead keen on doing either.

    Perhaps a better idea would be integrate rclone with the OSes keyring manager maybe using a library like this: https://github.com/zalando/go-keyring

  4. added this to the Help Wanted milestone on Jul 30, 2019
  5. marco-m commented on Nov 16, 2019

    @marco-m
    Contributor

    There is also another option, at the same security than integrating with the OS keyring, which can be done today with zero code changes: using a secure tool to make the RCLONE_CONFIG_PASSenvironment variable visible.

    I know at least 2 such tools:

    1. envchain for macOS and Linux.
    2. gopass for macOS, Linux and Windows.

    For example with envchain, the rclone invocation rclone ... would need to be prepended by

    $ envchain MYCONFIG rclone ...
    
  6. marco-m commented on Nov 16, 2019

    @marco-m
    Contributor

    Perhaps a better idea would be integrate rclone with the OSes keyring manager maybe using a library like this: https://github.com/zalando/go-keyring

    I investigated a bit that library. Following some PRs there, I found alternative https://github.com/keybase/go-keychain, which seems to be better maintained.

  7. ankur0493 commented on Apr 5, 2020

    @ankur0493
    Contributor
  8. ncw commented on Apr 11, 2020

    @ncw
    Member

    Now that rclone supports the --password-command flag it should be easy to integrate any 3rd party password manager provided they have a cli interface.

    I think that is my preferred solution for the moment, rather than attempt to integrate a myriad of password managers.

    What do you think?

  9. ivandeex commented on Nov 14, 2020

    @ivandeex
    Member

    @jtagcat @marco-m @ankur0493
    Please try rclone --password-command with envchain or gopass (see links to commands above).

  10. marco-m commented on Nov 14, 2020

    @marco-m
    Contributor

    Hello @ivandeex I think there is a misunderstanding here. Both envchain and gopass already worked with rclone, even before the --password-command, since these two tools work by setting the RCLONE_CONFIG_PASS environment variable. Or am I missing something ?

  11. ivandeex commented on Nov 14, 2020

    @ivandeex
    Member

    @marco-m
    Do you mean this issue can be closed?
    Misunderstanding is rather on my side.
    I'm just being triaging old and stale tickets.

  12. marco-m commented on Nov 14, 2020

    @marco-m
    Contributor

    Do you mean this issue can be closed?

    To my understanding yes. The first comment I wrote on this issue was already to propose an alternative to the OP.

    Note on the other hand that I am not the OP :-)

    And thanks for your housekeeping work, closing stale stuff is good.

  13. ivandeex commented on Nov 14, 2020

    @ivandeex
    Member

    @jtagcat Does your problem persist?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions