Re: problem setting user and group on mounting a cifs share
On Tue, 2008-04-29 at 22:46 +0200, Chris wrote:
> it only works with -ruv but not with -t. The time stamp is somehow
> not in the
> cards. Thus the files on the target all have the copy date. Not
> nice.
No, not nice. I backup a W***ws server over smb nightly, which works
well, but on the linux machine I use fusesmb. I also use the rsync
option '-av --no-p'. I do the copy as root in a crontab, but I'm pretty
sure it mounts as the user that invokes it, so this might be the
alternative you're looking for? Hopefully it behaves as well with your
NAS.
I remember it being a bit of a pain to get working as I glossed over the
documentation a bit quickly so below are two snippets to hopefully save
you some time (naturally it needs the fuse kernel module, and fusesmb
which is in apt.):
-------------------------------------------------------------
$ mkdir ~/.smb/
$ cat <<End > ~/.smb/fusesmb.conf
; Global settings
[global]
; Default username and password
username=
password=
; List hidden shares
;showhiddenshares=true
; Connection timeout in seconds
timeout = 10
;Interval for updating new shares in minutes
;You may want to set this lower - if you are adding/removing shares a
lot.
interval = 10
; Share-specific settings
[WORKGROUOP/MACHINE/SHARE]
username=user
password=userpassword
End
-------------------------------------------------------------
$ chmod 0600 ~/.smb/fusesmb.conf
$ mkdir ~/net
$ fusesmb ~/net
-------------------------------------------------------------
Hope this helps.
Cheers
Mark.
Reply to: