1828913 Members
2675 Online
109986 Solutions
New Discussion

Re: samba problem

 
Morcos
Super Advisor

samba problem

Hi,
I have redhat 8 and I was trying to configure the samba. I configured it, and when trying to access the shared folder from a windows pc, I wasn't able to open it.
The configuration is :
[global]
netbios name = zizlin
server string = Samba Server
security = share
update encrypted = yes
oby pam restrictions = yes
pam password change = yes
passwd program = /usr/bin/passwd %u
unix password sync = yes
log file =/var/log/samba/%m.log
max log size =50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
preferred master = True
dnx proxy = No
hosts allow = ipaddress of the window station
printing =lprng

[najic]
comment = test
path= /home/najic
read only = No
create mask = 0664
directory mask = 0775

on the windows station xp I can see "najic on samba server (zizlin) but only have to enter a password for the "Guest" and not able to access it. from another pc win2000 which i put the same ip and try to connect , I can put najic for user but failed to connect also.

Any idea? and what should i put for guest account, and guest ok??
Regards,
Ziad
10 REPLIES 10
Stuart Browne
Honored Contributor

Re: samba problem

In the global secion (usually) for 'guest account = ', the user should be someone who has sufficient unix rights to do what you want the windows user to have (i.e. to be able to read the files, or write or.. whatever).

In the 'najic' share, you should have 'guest ok = yes'.

Reload sabma, and give it a shot.
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: samba problem

You can use:

[najic]
comment = test
path= /home/najic
read only = No
create mask = 0664
directory mask = 0775
public = yes
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Morcos
Super Advisor

Re: samba problem

Hi,
Thx for the information. When putting 'guest account = and guest ok = yes I become able to access the folder without any prompt for user and password. But if I want to access a folder and being prompted for a username and password what to do ?

Regards,
Ziad
Stuart Browne
Honored Contributor

Re: samba problem

Change 'security = share' to 'security = user'
One long-haired git at your service...
Morcos
Super Advisor

Re: samba problem

Hi stuart,
I changed the value of security to "user" before asking the question and I was getting this error message:
"\\zizlin\najic is not accessible. you might not have permission to use this network resource.contact the administrator of this server to find out if you have access permission. The account is not authorized to login from this station."
Stuart Browne
Honored Contributor

Re: samba problem

Ur huh. Is the user you are accessing the share as (the windows user) a valid samba user? (i.e. you've done an 'smbpasswd -a ' ?
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: samba problem

You should have:

security = user

Then the user account added to the /etc/passwd with:

adduser

And to samba with:

smbpasswd -a

The username on both must match the username used in windows.

You can also authenticate users against a windows domain controller, if you have one.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Morcos
Super Advisor

Re: samba problem

I created a user called najic on windows, on the linux also using adduser, and to samba using smbpsswd -a.
I tried to access the folder from windows using the user najic,but still having the same error message:"\\zizlin\najic is not accessible"
Ivan Ferreira
Honored Contributor

Re: samba problem

This message "\\zizlin\najic is not accessible", maybe because the configuration did not take effect yet, so restart the samba service.

OR

There are some problems with netbios resolution. You have configured as preferred master = True, this may cause problems if you have a server version of Windows installed on the network. So, use peferred master = no and oslevel = 2, or instead configure the samba as a wins server and the clients as wins clients of the samba server.

OR

The owner or the permissions of the directory /home/nagic are incorrect. Correct the owner/permissions.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Steven E. Protter
Exalted Contributor

Re: samba problem

Simple way to go is security=user and have user accounts set up in both the Windows domain and on the Linux server. LDAP will also work if there are multiple Linux/Unix servers involved.

Its also a good idea to set up a machine account on the windows side for each Linux/Unix server. It makes it easier to find the Linux/Unix machine for the Windows users.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com