Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users created after v11 have to use <random>@auth.local emailaddress for OCM #2784

Open
dxlbnl opened this issue Jun 19, 2024 · 6 comments
Open

Comments

@dxlbnl
Copy link

dxlbnl commented Jun 19, 2024

When setting up OCM and sharing files I need to share it to @auth.local emailaddres instead of my contact-email.
I'd like to see shares to be able to be shared with contact emailaddresses. a

Screenshot 2024-06-19 at 09 52 54

@adamschoenemann
Copy link

Bump, I'm also seeing this. Also, when spinning up a new Seafile deployment via docker compose, the SEAFILE_ADMIN_EMAIL is not respected; an admin user with a similar @auth.local email address is created, so login is impossible (without mucking around in the database)

@freeplant
Copy link
Member

The OCM feature should have already been fixed in the latest version.

For SEAFILE_ADMIN_EMAIL issue, the SEAFILE_ADMIN_EMAIL should have been stored in the contact_email field for the user and can be used in loging.

@adamschoenemann
Copy link

Hmm, I'm definitely still having problems logging in. What I do is:

  • download the docker-compose from here
  • change timezone to 'Europe/Copenhagen'
  • change admin email and password
  • change SEAFILE_SERVER_HOSTNAME to my hostname
  • docker compose up -d
  • the server starts up and I can access it
  • when I try to log in I get a CSRF error
  • docker compose down
  • edit seahub_settings.py to trust https://<my-origin> (and also correct the FILE_SERVER_ROOT and SERVICE_URL to https)
  • docker compose up -d
  • when I attempt to login again, it consistently rejects my credentials.

I see in ccnet_db that my email is correct in EmailUser. However, all attempts are rejected.

I can add a new superuser with reset-admin.sh:

  • the script will ignore the email I pass in (but not the password)
  • if I copy the generated @auth.local and use my specified password, I can successfully log in.
  • as a workaround, I can then edit the 'login id` of my original admin user to something rememberable

@adamschoenemann
Copy link

Btw, I'm also getting lots of these warnings as described in #2508

@dunfusheng
Copy link

Hmm, I'm definitely still having problems logging in. What I do is:

  • download the docker-compose from here
  • change timezone to 'Europe/Copenhagen'
  • change admin email and password
  • change SEAFILE_SERVER_HOSTNAME to my hostname
  • docker compose up -d
  • the server starts up and I can access it
  • when I try to log in I get a CSRF error
  • docker compose down
  • edit seahub_settings.py to trust https://<my-origin> (and also correct the FILE_SERVER_ROOT and SERVICE_URL to https)
  • docker compose up -d
  • when I attempt to login again, it consistently rejects my credentials.

I see in ccnet_db that my email is correct in EmailUser. However, all attempts are rejected.

I can add a new superuser with reset-admin.sh:

  • the script will ignore the email I pass in (but not the password)
  • if I copy the generated @auth.local and use my specified password, I can successfully log in.
  • as a workaround, I can then edit the 'login id` of my original admin user to something rememberable

I followed the steps to install and did not reproduce the above problem.

@adamschoenemann
Copy link

This is very weird! You could not reproduce neither the failed login, nor the ignored email when running reset-admin.sh? I've reproduced this locally several times now.

For reference, this is my full docker-compose.yml:

services:
  db: 
    image: mariadb:10.11
    container_name: seafile-mysql
    environment:
      - MYSQL_ROOT_PASSWORD=db_dev  # Required, set the root's password of MySQL service.
      - MYSQL_LOG_CONSOLE=true
      - MARIADB_AUTO_UPGRADE=1
    volumes:
      - /opt/seafile/volumes/seafile-mysql/db:/var/lib/mysql  # Required, specifies the path to MySQL data persistent store.
    networks:
      - seafile-net

  memcached:
    image: memcached:1.6.18
    container_name: seafile-memcached
    entrypoint: memcached -m 256 
    networks:
      - seafile-net
»»»»»»»»»»
  seafile:
    image: seafileltd/seafile-mc:11.0-latest
    container_name: seafile
    ports:
      - "8000:80"
#     - "443:443"  # If https is enabled, cancel the comment.
    volumes:
      - /opt/seafile/volumes/seafile-data:/shared   # Required, specifies the path to Seafile data persistent store.
    environment:
      - DB_HOST=db
      - DB_ROOT_PASSWD=db_dev  # Required, the value should be root's password of MySQL service.
      - TIME_ZONE=Europe/Copenhagen  # Optional, default is UTC. Should be uncomment and set to your local time zone.
      - [email protected] # Specifies Seafile admin user, default is '[email protected]'.
      - SEAFILE_ADMIN_PASSWORD=asecret     # Specifies Seafile admin password, default is 'asecret'.
      - SEAFILE_SERVER_LETSENCRYPT=false   # Whether to use https or not.
      - SEAFILE_SERVER_HOSTNAME=seafile.adamschoenemann.dk # Specifies your host name if https is enabled.
    depends_on:
      - db
      - memcached
    networks:
      - seafile-net

networks:
  seafile-net:

As you can see, it's exactly the same that I linked, except for

  • the port mapping,
  • the timezone,
  • the volumes ,
  • the hostname

The server is behind an nginx ssl terminating proxy

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

No branches or pull requests

4 participants