No user listed after upgrading from 9.1.7 (9.1.8) to 10.0.9.5

Steps to reproduce

  1. Setup fresh server and owncloud 10.0.9.5
  2. Export database/config.php from 9.1.7 and import to new server
  3. Upgrade using sudo -u www-data ./occ upgrade

Expected behaviour

All local users should be listed under Users management page

Actual behaviour

Only Admin account is listed. Other account is only listed after they login

Server configuration

Operating system: Ubuntu 16.04

Web server: Apache2.4.18

Database: Mysql 5.7.23-0ubuntu0.16.04.1

PHP version: PHP 7.0.30-0ubuntu0.16.04.1

ownCloud version: 10.0.9.5

Updated from an older ownCloud or fresh install: Upgrade from 9.1.7

Where did you install ownCloud from: Tarball

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results into https://gist.github.com/ and puth the link here.

The content of config/config.php:
$CONFIG = array (
‘instanceid’ => ‘’,
‘passwordsalt’ => '’,
‘secret’ => '
’,
‘trusted_domains’ =>
array (
0 => 'octest.
.com’,
),
‘datadirectory’ => ‘/var/www/owncloud/data’,
‘overwrite.cli.url’ => ‘https://octest.************.com’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘10.0.9.5’,
‘dbname’ => ‘owncloud’,
‘dbhost’ => ‘localhost’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘*’,
‘dbpassword’ => '
’,
‘logtimezone’ => ‘UTC’,
‘installed’ => true,
‘theme’ => ‘’,
‘loglevel’ => 1,
‘maintenance’ => false,
‘trashbin_retention_obligation’ => ‘auto’,
‘memcache.local’ => ‘\OC\Memcache\APCu’,

Log in to the web-UI with an administrator account and click on
'admin' -> 'Generate Config Report' -> 'Download ownCloud config report'
This report includes the config.php settings, the list of activated apps
and other details in a well sanitized form.

or 

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

*ATTENTION:* Do not post your config.php file in public as is. Please use one of the above
methods whenever possible. Both, the generated reports from the web-ui and from occ config:list
consistently remove sensitive data. You still may want to review the report before sending.
If done manually then it is critical for your own privacy to dilligently
remove *all* host names, passwords, usernames, salts and other credentials before posting.
You should assume that attackers find such information and will use them against your systems.

List of activated apps:

  • comments: 0.3.0
  • configreport: 0.1.1
  • dav: 0.2.7
  • federatedfilesharing: 0.3.0
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: true
  • files_sharing: 0.10.0
  • files_trashbin: 0.9.0
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • notifications: 0.3.0
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • updatenotification: 0.2.1
If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder.

Are you using external storage, if yes which one: No

Are you using encryption: No

Are you using an external user-backend, if yes which one: No

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser: Firefox, Google Chrome

Operating system: Windows

Run the occ user:sync command (check the options of the command first) to sync the user backends into the ownCloud DB.

2 Likes

Thanks alot jvillafanez. It works. Details as below
I’m not using any external source so I ran following command to list my current source
sudo -u www-data ./occ user:sync -l
which returned OC\User\Database
I then ran
sudo -u www-data ./occ user:sync "OC\User\Database"
I selected option 2 to be safe and all my users are now showed up.
However, there is a group has number 1 indicates 1 user but it is not listed. I just deleted that group and recreated it and all good now.
Why don’t upgrade process run this command as well or leave a note?

How can I run this command in a hosted environment ?
Tnx

I managed to run the command, but no users were added :frowning: