1819850 Members
2722 Online
109607 Solutions
New Discussion юеВ

About the samba share

 
SOLVED
Go to solution
peterchu
Super Advisor

About the samba share

I hv setup the samba server on unix for windows user to access , now the windows user , I hv share the path /tmp/temp1 for windows user to share , now the windows user can read/write at this path , but the path /tmp/temp1 is mode 777 , if I change it to 775 , the user then can't write something to it . I tried the user can create files at the shell but why can't do it through the samba ? the below is my setting file , please suggest what is the problem ? thx.

[temp]
path = /tmp/temp1
allow hosts = my IP0
writeable = yes
read only = No
public = yes
create mask = 0664
6 REPLIES 6
T G Manikandan
Honored Contributor
Solution

Re: About the samba share

you have mentioned public=yes

which is public users have access to this share.
when they map it they fall into the "nobody" user on the remote machine that is the reason it is looking for 777 as it falls in others group.

Try mentioning
guest account=

map the guest account to a user in /etc/passwd which has permissions to that dir
Jan Sladky
Trusted Contributor

Re: About the samba share

hi Peter,

TGM is right, if you have no account for win users you are connected like nobody:nogroup

solution is create particular users via smbpasswwd -a

or use windows users mapping:
[global]
username map = /etc/samba/users.map

cat users.map
unixuser1 = windowsuser1, windowsuser2

and,of course, mapped user add via smbpasswd or use password server:

password server = servername

br Jan
GSM, Intelligent Networks, UNIX
peterchu
Super Advisor

Re: About the samba share

the below is my smb.conf and /etc/samba/users.map file but still not work , could suggest what is the problem ? thx


[global]
interfaces = eth0
username map = /etc/samba/users.map
password server = 192.168.11.1
wins server = 192.168.11.10
domain master = False
security = share
encrypt passwords = yes
name resolve order = wins lmhosts host bcast
workgroup = edp_nt1
server string = uixx1
netbios name = unix1
wins proxy = Yes
os level = 20


#vi /etc/samba/users.map
user1 = edp-user1


where user1 is the unix login id that can create file at /tmp/temp1 and edp-user1 is my windows ip .
Stefan Pendl
Valued Contributor

Re: About the samba share

If you use passwords, then you will have to manually keep the passwords synced in three places:

1) Windows Domain
2) smbpasswd file
3) passwd file for HP-UX

If you want to set up a share that is accessable for any user, then the best chioce is to set up a guest share:

map to guest = Bad User
guest account = smbnull (or any user you like)
guest ok = Yes

You can restriced access by using the IPs of the computers:

hosts allow = 129.0.1.31 129.0.1.32

The easiest way to configure Samba, is to use SWAT. Access it thru http://{YourSambaServer}:901 with a browser.

For every setting you can display a help screen, it includes a complete copy of the Samba book and more information on creating and integrating Samba.
Programing is fun.
Prashant Zanwar_4
Respected Contributor

Re: About the samba share

At the Unix side, add user to Unix group to which the file belongs. Your problem shall go away..

Thanks
Prashant
"Intellect distinguishes between the possible and the impossible; reason distinguishes between the sensible and the senseless. Even the possible can be senseless."
Govind_3
Regular Advisor

Re: About the samba share

If you are using Domain access for authentication you shouldnot have a problem. How ever if you are using guest access/no password acess you would run into this issue.
As somany have said before, its because it would treat the user as nobody then. If you can make sure the user is authenticated properly(with password and username) and if you set up the shares properly, the same permissions on the UNIX system would be available on the shares .
-Goodluck
Govind