-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
SMB/CIFS password visible in processlist #6092
Comments
There might be a way to pass the password to smbclient using popen's stdin |
@PVince81 Not sure whether smbclient accepts password from stdin, but it supports reading credentials from a file. The option is |
It probably does, @icewind1991 did it in his PR. |
Just out of curiosity, where are we on this issue? Just installed v6.0 and its still there, is it awaiting commit? :) |
There is a full rewrite of the smbclient storage in the PR above. |
Sounds good! |
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 |
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. |
Not sure if i did something wrong. But id didn't work. The effect is that the "External storage support" application disappear from OC and also the mount. Any idea? |
I think this is not backportable. |
This is sad. Is there an intermediate fix for this? |
Suggestions:
This only works if it's the admin who is mounting the storage, not the users mounting them themselves.
|
@Xenopathic would you have time to have a look at my suggestion from point 3) ? |
1-2 are no options because I need to dynamically mount with user credentials.
|
@PVince81 I'm approaching release for my current project, so I'll see what I can do next week. Although perhaps it would be better to focus efforts on getting the SMB rewrite done? I heard it mentioned that the best solution would be a PHP native module to hook into SMB, rather than needing |
@Xenopathic also approaching OC 7 release now, so I have time next week as well. The current rewrite by @icewind1991 is NOT using a native approach. It's just a better way to wrap the The fix I referred to at step 3) might be easier than thought, so might be worth a try. |
@PVince81 I understand that the rewrite by @icewind1991 pipes commands to |
Yes, the ultimate approach 😄 |
I want to add another very problematic thing (that can be fixed instantly): The password is also written in plaintext to data/owncloud.log! |
Hmm, weird. In my owncloud.log I have
My version:
|
Ah, those commits are just removing a username and password if they are logged in a format like:
Think it could be useful to track this in a separate issue. |
Ok, done: #9467 |
v7.0.2 shows passwords in plaintext when running "top" or "ps aux" when using the OC pass-through authentication. is that supposed to be fixed? |
No. There is work in progress in OC 8 to provide a native SMB external storage (#9480) which does not rely on the smbclient command any more. |
Ok... thanks. I'll keep an eye open for v8 :-) |
When using external storage "SMB/CIFS" username and password becomes visible to users logged in on the server.
The password is visible when listing processes on the server (ps -ef)
This is a running process:
sh -c smbclient -N -U 'DOMAIN/UID%PASSWORD' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -O 'TCP_NODELAY IPTOS_LOWDELAY SO_KEEPALIVE SO_RCVBUF=8192 SO_SNDBUF=8192' -d 0 '//sambaserver/share' -c 'dir "UID\Documents\Download\desktop.ini"' 2>/dev/null
The text was updated successfully, but these errors were encountered: