Wiki . Forums . Bugs . Translation . Privacy Policy | Search . Simple . Advanced | Reports . Help | Matrix . 10.x . 11.x . 12.x . 13.x . Future . Recent . Contribs

Bug 4529 - Wokstation backup fails if user password contains comma character
Summary: Wokstation backup fails if user password contains comma character
Status: CLOSED DUPLICATE of bug 4850
Alias: None
Product: SME Server 7.X
Classification: SME Server
Component: e-smith-*/smeserver-* packages (show other bugs)
Version: 7.5
Hardware: --- ---
: P3 normal
Target Milestone: nobug
Assignee: SME Server bug team
QA Contact: SME Server bug team
URL:
Depends on:
Blocks:
 
Reported: 2008-09-02 02:40 CEST by Giacomo Sanchietti
Modified: 2009-05-15 01:09 CEST (History)
5 users (show)

See Also:
Package: ---


Attachments
Patch to handle correctly the password (550 bytes, patch)
2008-09-02 02:44 CEST, Giacomo Sanchietti
Details | Diff
Patch to handle correctly the password (516 bytes, patch)
2008-09-02 02:48 CEST, Giacomo Sanchietti
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Giacomo Sanchietti 2008-09-02 02:40:57 CEST
When configuring a workstation backup, the user password to access the share can't contain a comma character.

Step to reproduce the problem:
1) Backup or Restore
2) Select "Configure workstation backup"
3) Complete the field using a user name like "mario" and password "mario,1234"
4) Execute and Verify backup fails because the mount command can't handle the comma inside the password.

From 'man smbmount':

BUGS
       Passwords and other options containing , can not be handled. For passwords an alternative way of passing them is in a credentials file or in the PASSWD environment.


While is unusual to have a comma in the user name, I think this can happens in passwords.
Comment 17 chris burnat 2009-05-15 01:09:25 CEST
Closing Duplicates, Wontfix and Invalids
Comment 16 Ian Wells 2009-05-14 11:58:00 CEST
(In reply to comment #15)
> (In reply to comment #14)
> > Gavin are you sure this is a duplicate?
> 
> Yes, as both are related to the password box in the backup to workstation panel
> that cannot contain certain characters.

I thought it was a dup, it is a case of the panel accepting a password that is not accepted by mount.cifs (rather than samba). I just didn't remember/find this bug number before Gav.
Comment 15 Gavin 2009-05-14 11:54:32 CEST
(In reply to comment #14)
> Gavin are you sure this is a duplicate?

Yes, as both are related to the password box in the backup to workstation panel that cannot contain certain characters.
Comment 14 Jonathan 2009-05-14 11:48:00 CEST
(In reply to comment #13)
> Marking as a dup of bug 4850
> 
> *** This bug has been marked as a duplicate of bug 4850 ***

Gavin are you sure this is a duplicate? Are comma's not allowed in samba passwords?
Comment 13 Gavin 2009-05-14 11:35:28 CEST
Marking as a dup of bug 4850

*** This bug has been marked as a duplicate of bug 4850 ***
Comment 12 Charlie Brady 2009-05-14 10:52:15 CEST
The mount man page doesn't tell us how to quote , in the options string. We'd need to look in the source code to find out whether there is such a method. If there isn't, then the only choice looks to be to not allow , in the password.
Comment 11 Jonathan 2009-05-14 10:45:00 CEST
(In reply to comment #10)
> Confirming that this occurs with DAR on SME7. (so moving it)
> 
> A password such as T.est00 works
> A password such as T,est00 fails

Looking at submitted patches I doubt if it is really necessary to set the password to a variable, I think we can also solve it by quoting a little differently but have not tried.

What does it do when you have a comma in your password and you change:

if(system("/bin/mount", "-t", $smbfs, "-o", "username=$smbuser,password=$smbpass",
        $smbshare, "/mnt/backup_smb") == 0)

to 

if(system("/bin/mount", "-t", $smbfs, "-o", 'username="$smbuser",password="$smbpass"',
        $smbshare, "/mnt/backup_smb") == 0)

(It seems bugzilla messes a little with the line ends :( )
Comment 10 Ian Wells 2009-05-14 02:49:54 CEST
Confirming that this occurs with DAR on SME7. (so moving it)

A password such as T.est00 works
A password such as T,est00 fails

This is in the email from the failed backup

Mounting backup shared directory 192.168.0.254/temp
*** No backup allowed or error during backup ***
Error while mounting 192.168.0.254:temp :
mount error 13 = Permission denied
Refer to the mount.cifs(8) manual page (e.g.man mount.cifs) 

And from /var/log/messages

May 14 09:27:02 sme7test1 kernel: CIFS: Unknown mount option est00
May 14 09:27:02 sme7test1 kernel: Status code returned 0xc000006d NT_STATUS_LOGON_FAILURE
May 14 09:27:02 sme7test1 kernel:  CIFS VFS: Send error in SessSetup = -13
May 14 09:27:02 sme7test1 kernel:  CIFS VFS: cifs_mount failed w/return code = -13

Note: Unknown mount option est00
Here it has taken the est00 from the password after the comma
Comment 9 Charlie Brady 2009-01-30 06:16:11 CET
Re-opening, as I expect this affects DAR backup to workstation in latest SME server as well. We should check what happens if comma is included in password.
 
Filippo, are you going to publish your improvements?
Comment 8 chris burnat 2009-01-30 01:38:24 CET
Closing Invalids
Comment 7 Filippo Carletti 2009-01-29 05:14:37 CET
Bug do not refers to sme software.
FTR, the backup lib I mention is introduced in bug 3209.
Comment 6 Filippo Carletti 2008-09-02 07:30:25 CEST
The patch is for an experimental version of the backup that Federico was working on and the bug had to be opened in our internal bug tracker.
Comment 5 Giacomo Sanchietti 2008-09-02 07:17:32 CEST
The problem is relative to our internal version of SME Server (NethService). 

I don't know if dar has the same problem.

Sorry for the mistake.
Comment 4 Charlie Brady 2008-09-02 06:59:14 CEST
Re-opening, I don't see anything invalid here, except that Giacomo isn't making it clear where the problem lies and what he is patching. I assume that it is the experimental DAR addition to the backup panel. Perhaps it is in a contrib. In either case, we need to keep the bug open, and just move to the correct section of the bug tracker.
Comment 3 Filippo Carletti 2008-09-02 02:59:06 CEST
Wrong bugtracker.
Comment 2 Giacomo Sanchietti 2008-09-02 02:48:47 CEST
Created attachment 2100 [details]
Patch to handle correctly the password

Patch for file /sbin/e-smith/smb_backup
Comment 1 Giacomo Sanchietti 2008-09-02 02:44:03 CEST
Created attachment 2099 [details]
Patch to handle correctly the password

Patch for file /etc/e-smith/web/functions/backup