You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
not uid, as this may either be a non-descriptive random string (e.g. "user0356") or an invitation for remote brute-force attacks (e.g. "johnd") ;
but cn (i.e. "John.Doe"), as this is descriptive and does not reveal the loginname credentials (= best practices).
For standard CIFS/SFTP/etc. configurations, the home directory (e.g. "/home/johnd/") or CIFS share (e.g. "\\server\johnd") refers to the uid, and not the cn. This conflicts with the abovementioned scenario.
This issue can be mitigated by either generating symbolic links at the file server level (e.g. "ln -s johnd/ John.Doe", or by extending username maps at the CIFS server level (e.g. /etc/samba/username.map : "johnd = John.Doe"), but this is cumbersome and requires elevated privileges on the file server.
A better approach would be to propagate the session loginname as a variable.
Steps to reproduce
Expected behaviour
Actual behaviour
Rationale for RFE
This issue can be mitigated by either generating symbolic links at the file server level (e.g. "ln -s johnd/ John.Doe", or by extending username maps at the CIFS server level (e.g. /etc/samba/username.map : "johnd = John.Doe"), but this is cumbersome and requires elevated privileges on the file server.
A better approach would be to propagate the session loginname as a variable.
Proposal
Add a line of code at https://github.com/nextcloud/server/blob/master/apps/files_external/lib/config.php#L207
and at https://github.com/nextcloud/server/blob/master/apps/files_external/lib/config.php#L212
where
$loginnamerefers to->session->get('loginname')This would allow to use the loginname credentials in these scenarios.
Server configuration
Operating system: Linux
Web server: Apache
Database: PostgreSQL
PHP version: 7.2
Nextcloud version: (see Nextcloud admin page) 14.0.2
Updated from an older Nextcloud/ownCloud or fresh install: fresh
Where did you install Nextcloud from:
Are you using external storage, if yes which one: smb
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP