Hi, I want connect a linux client to linux server to modify files. On my server: password file: tommy:x:1002:100:Tommy:/home/tommy:/bin/sh smb.conf: [global] workgroup=WORKGROUP security=share [bilder] path=/var/lib/export force user=tommy force group=users valid users=tommy write list=tommy On client: mount.cifs //DESKTOP/bilder /home/dih/tommy/ -o user=tommy I see the files on root: -rwxr-xr-x 1 1002 users 628 Nov 11 19:15 configure.sh -rw-r--r-- 1 1002 users 0 Nov 25 11:33 d -rw-r--r-- 1 1002 users 0 Nov 25 12:49 dd -rwxr--r-- 1 1002 users 753647 Nov 22 19:48 p6140385.jpg -rwxr-xr-x 1 1002 users 720 Nov 19 14:29 photo-ma I can "touch x" without trouble and have uid 1002: -rw-r--r-- 1 1002 users 0 Nov 25 16:02 x I have no user on uid 1002. I want modify the files not on root but have wrong permissions. Can someone help me. With regards Dietrich
When you are using samba to connect, the user, group and file permission get passed through it. Rather than trying to force a particular user, try mapping the Windows (samba) user to the local (server) user tommy. On 25/11/12 10:10 AM, Dietrich Hentschel wrote:> Hi, > > I want connect a linux client to linux server to modify files. > > On my server: > > password file: tommy:x:1002:100:Tommy:/home/tommy:/bin/sh > > smb.conf: > [global] > workgroup=WORKGROUP > security=share > > [bilder] > path=/var/lib/export > force user=tommy > force group=users > valid users=tommy > write list=tommy > > On client: > > mount.cifs //DESKTOP/bilder /home/dih/tommy/ -o user=tommy > > I see the files on root: > -rwxr-xr-x 1 1002 users 628 Nov 11 19:15 configure.sh > -rw-r--r-- 1 1002 users 0 Nov 25 11:33 d > -rw-r--r-- 1 1002 users 0 Nov 25 12:49 dd > -rwxr--r-- 1 1002 users 753647 Nov 22 19:48 p6140385.jpg > -rwxr-xr-x 1 1002 users 720 Nov 19 14:29 photo-ma > > I can "touch x" without trouble and have uid 1002: > -rw-r--r-- 1 1002 users 0 Nov 25 16:02 x > > > I have no user on uid 1002. I want modify the files not on root but > have wrong permissions. > > Can someone help me. > > With regards > > Dietrich >
hi again, thank you for answer. On 25.11.2012 20:01, Gary Dale wrote:> When you are using samba to connect, the user, group and file permission > get passed through it. Rather than trying to force a particular user, > try mapping the Windows (samba) user to the local (server) user tommy. >I added in [global] "username map", but it do not work. [global] workgroup=WORKGROUP security=share username map = /etc/samba/users.map [bilder] path=/var/lib/export # force user=tommy # force group=users valid users=tommy write list=tommy with "tommy = dih" in file "/etc/samba/users.map" (dih is user on linux client). What can I do to map uid and gid to client? With regards Dietrich> > On 25/11/12 10:10 AM, Dietrich Hentschel wrote: >> Hi, >> >> I want connect a linux client to linux server to modify files. >> >> On my server: >> >> password file: tommy:x:1002:100:Tommy:/home/tommy:/bin/sh >> >> smb.conf: >> [global] >> workgroup=WORKGROUP >> security=share >> >> [bilder] >> path=/var/lib/export >> force user=tommy >> force group=users >> valid users=tommy >> write list=tommy >> >> On client: >> >> mount.cifs //DESKTOP/bilder /home/dih/tommy/ -o user=tommy >> >> I see the files on root: >> -rwxr-xr-x 1 1002 users 628 Nov 11 19:15 configure.sh >> -rw-r--r-- 1 1002 users 0 Nov 25 11:33 d >> -rw-r--r-- 1 1002 users 0 Nov 25 12:49 dd >> -rwxr--r-- 1 1002 users 753647 Nov 22 19:48 p6140385.jpg >> -rwxr-xr-x 1 1002 users 720 Nov 19 14:29 photo-ma >> >> I can "touch x" without trouble and have uid 1002: >> -rw-r--r-- 1 1002 users 0 Nov 25 16:02 x >> >> >> I have no user on uid 1002. I want modify the files not on root but >> have wrong permissions. >> >> Can someone help me. >> >> With regards >> >> Dietrich >> >
On Mon, Nov 26, 2012 at 12:06:50PM +0100, Dietrich Hentschel wrote:> hi again, > > thank you for answer. > > > On 25.11.2012 20:01, Gary Dale wrote: > >When you are using samba to connect, the user, group and file permission > >get passed through it. Rather than trying to force a particular user, > >try mapping the Windows (samba) user to the local (server) user tommy. > > > > I added in [global] "username map", but it do not work. > > > [global] > workgroup=WORKGROUP > security=shareIf possible, avoid security=share. This is deprecated for a while now. Volker -- SerNet GmbH, Bahnhofsallee 1b, 37081 G?ttingen phone: +49-551-370000-0, fax: +49-551-370000-9 AG G?ttingen, HRB 2816, GF: Dr. Johannes Loxen http://www.sernet.de, mailto:kontakt at sernet.de