Seafile - Fatal error: two-factor authentication is not enabled on this account

What is the problem you are having with rclone?

I use rclone inside a Docker container.

Click here for the Dockerfile
FROM python:3-slim

ARG DOCKER_TAG

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get -y update
RUN apt-get -y install --no-install-recommends locales curl gnupg
RUN echo "en_US.UTF-8 UTF-8" >> /etc/locale.gen
RUN locale-gen

# Add neurodebian sources for git-annex-standalone
RUN curl <URL_REMOVED>  > /etc/apt/sources.list.d/neurodebian.sources.list
RUN apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xA5D32F012649A5A9
RUN apt-get -y update

# Rclone is a useful add-on
RUN curl -O <URL_REMOVED> && dpkg -i rclone*deb && rm -f rclone*deb

# install packages
RUN apt-get -y install --no-install-recommends git git-annex-standalone git-annex-remote-rclone make

RUN pip3 install "datalad${DOCKER_TAG+==$DOCKER_TAG}"

# clean up
RUN apt-get clean

RUN git config --global user.name "Docker Datalad"
RUN git config --global user.email "docker-datalad@example.com"

ENTRYPOINT ["datalad"]

I've recently rebuilt the container to install make in it (updating the rclone version to v1.56.1).
Since then, my rclone config command is failing:

rclone config create $CONFIG_NAME seafile url $SEAFILE_URL user $MY_EMAIL_ADDRESS library $LIBRARY_NAME pass $PASSWORD

This is the error message:

Error: two-factor authentication is not enabled on this account
Usage:
  rclone config create `name` `type` [`key` `value`]* [flags]
Flags:
      --all               Ask the full set of config questions.
      --continue          Continue the configuration process with an answer.
  -h, --help              help for create
      --no-obscure        Force any passwords not to be obscured.
      --non-interactive   Don't interact with user and return questions.
      --obscure           Force any passwords to be obscured.
      --result string     Result - use with --continue.
      --state string      State - use with --continue.
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
2021/09/30 12:03:17 Fatal error: two-factor authentication is not enabled on this account

I've tried to add 2fa false and seafile-2fa false but this did not change anything.

I wonder if this could be related to this recent change (see rclone CHANGELOG):

Fix 2fa config state machine (Fred)

Unfortunately, I can't reproduce the previous rclone version that I used before I rebuilt the container (when things still worked).

What is your rclone version (output from rclone version)

I use rclone v1.56.1.

rclone --version
rclone v1.56.1
- os/version: debian 11.0 (64 bit)
- os/kernel: 4.9.184-linuxkit (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.16.8
- go/linking: static
- go/tags: none

Which cloud storage system are you using? (eg Google Drive)

Seafile

The command you were trying to run (eg rclone copy /tmp remote:tmp)

rclone config create $CONFIG_NAME seafile url $SEAFILE_URL user $MY_EMAIL_ADDRESS library $LIBRARY_NAME pass $PASSWORD

The rclone config contents with secrets removed.

rclone config
2021/09/30 13:55:45 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
No remotes found - make a new one
n) New remote
s) Set configuration password
q) Quit config
n/s/q> 

There are no rclone configs because they are created inside the container.

A log from the command

$ rclone config create $CONFIG_NAME seafile url $SEAFILE_URL user $MY_EMAIL_ADDRESS library $LIBRARY_NAME pass $PASSWORD
2021/09/30 12:03:17 NOTICE: Config file "/root/.config/rclone/rclone.conf" not found - using defaults
Error: two-factor authentication is not enabled on this account
Usage:
  rclone config create `name` `type` [`key` `value`]* [flags]
Flags:
      --all               Ask the full set of config questions.
      --continue          Continue the configuration process with an answer.
  -h, --help              help for create
      --no-obscure        Force any passwords not to be obscured.
      --non-interactive   Don't interact with user and return questions.
      --obscure           Force any passwords to be obscured.
      --result string     Result - use with --continue.
      --state string      State - use with --continue.
Use "rclone [command] --help" for more information about a command.
Use "rclone help flags" for to see the global flags.
Use "rclone help backends" for a list of supported services.
2021/09/30 12:03:17 Fatal error: two-factor authentication is not enabled on this account

Thanks in advance for any help!

Can you see if you can make it work with v1.56.0 - that would be a strong pointer to the fact that that change broke it.

It should be easy to rebuild the container with v1.56.0 I would have thought.

If it works with v1.56.0 and not with v1.56.1 then please open a new issue on Github.

Thanks for your response @ncw!

I've followed your suggestion and tried several previous versions.
Turns out that the error appears in v1.56.0.
v1.55.1 and all previous versions that I tested work fine.
Not sure which change in v1.56.0 could cause the issue.

For my purposes, I'm fine with using v1.55.1 or earlier, so for me this is resolved now. Thanks!

Happy to open up a new issue, if you want to investigate this further.

Thanks again!

It would be worth opening a new issue on Github so we can fix this for subsequent rclone releases.

Can you make that issue and put a link to this forum post please? Thank you.

Ok, I opened a new issue here.

Thanks again for your time and help @ncw!

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