[Samba] Editing Word documents in a share from windows and Linux

Eduardo Sotomayor easgs at hotmail.com
Thu Nov 19 13:23:03 MST 2009


I have found something interesting, if I run the command wbinfo -u I get this



SIENIC\root

SIENIC\administrator

SIENIC\amartinez

SIENIC\esotomayor

SIENIC\contador



if I run the command wbinfo -g



SIENIC\domain admins

SIENIC\domain guests

SIENIC\domain users



but if I run the command getent passwd I get this



at:x:25:25:Batch jobs daemon:/var/spool/atjobs:/bin/bash

avahi:x:101:104:User for Avahi:/var/run/avahi-daemon:/bin/false

bin:x:1:1:bin:/bin:/bin/bash

daemon:x:2:2:Daemon:/sbin:/bin/bash

dnsmasq:x:102:65534:dnsmasq:/var/lib/empty:/bin/false

ftp:x:40:49:FTP account:/srv/ftp:/bin/bash

games:x:12:100:Games account:/var/games:/bin/bash

haldaemon:x:106:109:User for haldaemon:/var/run/hald:/bin/false

lp:x:4:7:Printing daemon:/var/spool/lpd:/bin/bash

mail:x:8:12:Mailer daemon:/var/spool/clientmqueue:/bin/false

man:x:13:62:Manual pages viewer:/var/cache/man:/bin/bash

messagebus:x:100:102:User for D-Bus:/var/run/dbus:/bin/false

news:x:9:13:News system:/etc/news:/bin/bash

nobody:x:65534:65533:nobody:/var/lib/nobody:/bin/bash

ntp:x:74:101:NTP daemon:/var/lib/ntp:/bin/false

polkituser:x:105:108:PolicyKit:/var/run/PolicyKit:/bin/false

postfix:x:51:51:Postfix Daemon:/var/spool/postfix:/bin/false

pulse:x:104:106:PulseAudio daemon:/var/lib/pulseaudio:/sbin/nologin

root:x:0:0:root:/root:/bin/bash

rtkit:x:103:105:RealtimeKit:/proc:/sbin/nologin

sshd:x:71:65:SSH daemon:/var/lib/sshd:/bin/false

suse-ncc:x:107:110:Novell Customer Center User:/var/lib/YaST2/suse-ncc-fakehome:/bin/bash

uucp:x:10:14:Unix-to-Unix CoPy system:/etc/uucp:/bin/bash

wwwrun:x:30:8:WWW daemon apache:/var/lib/wwwrun:/bin/false

adolfo:x:1000:100:adolfo:/home/adolfo:/bin/bash





as you can see, the domain users are not present, only the local users,
may be that is why I can not use the options UID or GID, and if I run 



chown amartinez recurso2



I get



chown: Invalid User: amartinez





where amartinez is a domain user



this is the content of the nsswitch.conf file







passwd:	compat winbind

group:	compat winbind



hosts:	files mdns4_minimal [NOTFOUND=return] dns

networks:	files dns



services:	files

protocols:	files

rpc:	files

ethers:	files

netmasks:	files

netgroup:	files nis

publickey:	files



bootparams:	files

automount:	files nis

aliases:	files







I have shutdown the nscd service as recommended in the samba how to book
		


I solved the problem by adding the following lines to the smb.conf fine in the [global] section.



winbind enum user = yes



winbind enum group = yes


Now it is working fine.




From: easgs at hotmail.com
To: samba at lists.samba.org
Subject: FW: [Samba] Editing Word documents in a share from windows and Linux
Date: Wed, 18 Nov 2009 16:00:37 +0000
















This is the command I have used:

mount -t cifs -o username=amartinez //192.168.0.2/archivos1 /home/SIENIC/amartinez/recurso2

these are the permissions of the folder before mount command

drwxrws--- 3 SIENIC\amartinez SIENIC\domain users  4096 nov 17 09:58 prueba2

these are the permissions of the folder after mount command

drwsrwsr-x  3 adolfo           BUILTIN\administrators     0 nov 17 15:05 recurso2


this is why the share is read only, the current user is the domain user "amartinez", adolfo is a local user, this machine is part of a DOMAIN, the PDC is a openSUSE 11.2 domain controller

how can I mount this share as a read/write share for the domain users logged in the current workstation?



> Date: Tue, 17 Nov 2009 18:29:01 +0200
> From: eero.volotinen at iki.fi
> To: easgs at hotmail.com
> CC: samba at lists.samba.org
> Subject: Re: [Samba] Editing Word documents in a share from windows and Linux
> 
> Eduardo Sotomayor wrote:
> > I have a problem editing files in a samba share, this share is accessed from a Windows xp and a Linux client, when I open a Word Document from windows there is no problem, but when I try to edit the same file from the linux pc with writer, it opens a new file, not the file I want to edit, I have checked the file permissions from the linux client and all the fields are blank, but if I copy the file to the local drive I can edit it, this is a openSUSE 11.2 box.
> > 
> > This is how I created the folder containing the files in the Linux server (openSUSE 11.2), this server is setup as a PDC using LDAP as backend
> 
> Are you using samba files via cifs mount ? It requires some parameters 
> to map rights correctly.
> 
> --
> Eero
 		 	   		  
Discover the new Windows Vista Learn more! 		 	   		  
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy! Try it! 		 	   		  
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us


More information about the samba mailing list