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
@PVince81 Not sure whether smbclient accepts password from stdin, but it supports reading credentials from a file. The option is -A, --authentication-file=FILE Get the credentials from a file.
This is sad. Is there an intermediate fix for this?
Actually this causes me sleepless nights to know that the password appears in the "publicly" visible process list.
try mounting the SMB storage directly on the Linux filesystem (using "cifs").
For example mount it to "/mnt/smbstorage1".
Then in ownCloud, create a "Local" external storage that points to "/mnt/smbstorage1".
This only works if it's the admin who is mounting the storage, not the users mounting them themselves.
You could also hack smb4php/smb.php yourself and try hard-coding the option -A like @bantu suggested here: SMB/CIFS password visible in processlist #6092 (comment)
But it means you need to have a local file containing the passwords of all the SMB mounts.
the clean alternative: need to fix smb4php/smb.php (which is a third party library) to not pass the password directly on the command line but pass it by writing to the process' stdin. It could be a matter of calling fwrite() with the password on the process handle after the popen() call. And also remove the password from the SMB URL that is built.
Activity
PVince81 commentedon Nov 28, 2013
There might be a way to pass the password to smbclient using popen's stdin
bantu commentedon Dec 1, 2013
@PVince81 Not sure whether smbclient accepts password from stdin, but it supports reading credentials from a file. The option is
-A, --authentication-file=FILE Get the credentials from a file.PVince81 commentedon Dec 2, 2013
It probably does, @icewind1991 did it in his PR.
But good to know!
Ewoxx commentedon Dec 16, 2013
Just out of curiosity, where are we on this issue? Just installed v6.0 and its still there, is it awaiting commit? :)
PVince81 commentedon Dec 17, 2013
There is a full rewrite of the smbclient storage in the PR above.
Before that PR can be merged it needs to be reviewed and regression tested.
Ewoxx commentedon Dec 17, 2013
Sounds good!
How does it work after that? Will release an update with a bunch of fixes and this one in it?
PVince81 commentedon Dec 19, 2013
Since it's a full rewrite it will probably be released as part of OC 7.
@icewind1991 would it be possible to extract the password hiding/piping approach of your PR and apply it to OC 6's
smb4php ?
icewind1991 commentedon Dec 19, 2013
Not without significant work I think.
It may be safer to backport the whole thing to oC6 once it's properly tested
@Ewoxx you can test the new SMB backend by copying the files_external app from https://github.com/owncloud/core/tree/smb/apps into your installation, it should work just fine in oC6.
(Make sure to backup any important data, that everything works for me is no guarantee until we've done more testing)
Ewoxx commentedon Dec 19, 2013
Not sure if i did something wrong. But id didn't work.
This is what I did:
cd /var/www
wget https://github.com/owncloud/core/archive/smb.zip
unzip smp.zip
mv /var/www/html/owncloud/apps/files_external .
cp -rv /var/www/core-smb/apps/files_external /var/www/html/owncloud/apps
chown -R apache: /var/www/html/owncloud/apps/files_external
service httpd restart
The effect is that the "External storage support" application disappear from OC and also the mount.
Any idea?
PVince81 commentedon Jun 20, 2014
I think this is not backportable.
Also the SMB client rewrite didn't make it into OC 7.
So will have to go to OC 8.
eigenphase commentedon Jul 3, 2014
This is sad. Is there an intermediate fix for this?
Actually this causes me sleepless nights to know that the password appears in the "publicly" visible process list.
PVince81 commentedon Jul 3, 2014
Suggestions:
For example mount it to "/mnt/smbstorage1".
Then in ownCloud, create a "Local" external storage that points to "/mnt/smbstorage1".
This only works if it's the admin who is mounting the storage, not the users mounting them themselves.
You could also hack
smb4php/smb.phpyourself and try hard-coding the option-Alike @bantu suggested here: SMB/CIFS password visible in processlist #6092 (comment)But it means you need to have a local file containing the passwords of all the SMB mounts.
the clean alternative: need to fix
smb4php/smb.php(which is a third party library) to not pass the password directly on the command line but pass it by writing to the process' stdin. It could be a matter of callingfwrite()with the password on the process handle after thepopen()call. And also remove the password from the SMB URL that is built.PVince81 commentedon Jul 3, 2014
@Xenopathic would you have time to have a look at my suggestion from point 3) ?
13 remaining items
svensol commentedon Sep 9, 2014
Ok... thanks. I'll keep an eye open for v8 :-)