Operating System - Linux
1824993 Members
2145 Online
109678 Solutions
New Discussion юеВ

Re: Enable Samba on Linux RHAS 3.0

 
SOLVED
Go to solution
Jorge Cocomess
Super Advisor

Enable Samba on Linux RHAS 3.0

Hi,
I am about to set up Samba on my linux server. Once Samba is setup, I would like for all of the users currently on the system to have access to this share point.

Would you please kinda enough to guide me through this process.

Thank you in advance.

JC
14 REPLIES 14
Stuart Browne
Honored Contributor
Solution

Re: Enable Samba on Linux RHAS 3.0

I suggest you make sure 'swat' is enabled, and use that to configure your shares. It's a web interface listening on port 901.

Turn it on with 'chkconfig swat on', then point a browser at it.
One long-haired git at your service...
Ivan Ferreira
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

Start with:

chkconfig smb on

Edit /etc/samba/smb.conf

Workgroup = WORKGROUPNAME
security = share

Security = share is the most simple method of sharing.
In the shares section at the end of the file

[public]
comment = Public share
path = /public
public = yes
wirtable = yes
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: Enable Samba on Linux RHAS 3.0

Shalom JC,

This depends a lot on your environment.

Samba can be configured to authenticate users from a Windows Domain. You need to configure security = server in smb.conf or using swat and then run a command net join in order to have the machine join the domain.

The simple way to do all this is the smbpasswd command.

You manually add all users to a Samba authentication datbase using the smbpasswd -a format.

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
Vitaly Karasik_1
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

Jorge,

I suggest you to use "domain" as security level - this will provide your users from MS Windows with a transparent access to a Samba file/printer server.

See this article:
http://www.informit.com/articles/article.asp?p=169560&seqNum=3&rl=1 Samba-3 Server Types and Security Modes

Jorge Cocomess
Super Advisor

Re: Enable Samba on Linux RHAS 3.0

I took you radvice and set the security = share and workgroup = server_name. I added to the domain and tested okay so far.

Great article on the 3 security levels that you can set for the samba. I will read it throughly and set it up to the way it was supposed to.

Thanks everyone for the education on samba.

Regards,
J
Jorge Cocomess
Super Advisor

Re: Enable Samba on Linux RHAS 3.0

I have quick question;
A user had trouble saving a file to a directory that I created the share folder for. Do I need to modify the "create mode" from 0664 to something else or do I modify the directory mode from 0775 to 0777??

Please help.

Thank you.
J
Vitaly Karasik_1
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

AFAIK, if Samba user is owner of a shared directory, 755 permission is OK.
Jorge Cocomess
Super Advisor

Re: Enable Samba on Linux RHAS 3.0

No, the samba user does not own the directory. Please advise.

Thanks,
J
Ivan Ferreira
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

Yes, you need to play with the create mode, directory mode and force user options. You can also set the SGID bit for the directories.

See the man page for descriptions.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Vitaly Karasik_1
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

Sorry, probably I was not clean. I meant not user "samba", but "user, which connect via Samba". This user should be owner of a shared dir. Or you can set 775 permission and include user into group.
Jorge Cocomess
Super Advisor

Re: Enable Samba on Linux RHAS 3.0

Hi,

Here's an example of the top portion of my smb.conf file. Should I modify the os level?

Thanks,
J



path = /client_user/reportdir
smb passwd file = /etc/samba/smbpasswd
printing = lprng
dns proxy = no
encrypt passwords = yes
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
max log size = 0
security = share
server string = Windows share point
workgroup = Hawk
comment = Client Directory
log file = /var/log/samba/%m.log
load printers = no
os level = 20
default = global



Ivan Ferreira
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

The os level depends, if you don't have any Windows Server on your network, configure a highg os level, and enable the wins server.

If you have a Windows Server on your network, configure a low value (like 3) and enable the wins client.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Jorge Cocomess
Super Advisor

Re: Enable Samba on Linux RHAS 3.0

Yes, I do have many Windows servers on the network. It seems to be working fine with os level set to 20. Should I just leave it alone or change it to level 3 like you've suggested?

Thanks,
J
Stuart Browne
Honored Contributor

Re: Enable Samba on Linux RHAS 3.0

To win browser-server elections, Samba is usually set up high (60+). Windows servers use 32 I believe, so anything under that should be ok.

If the Windows servers are still acting like kthe kings-of-the-hill, then you've set it low enough (i.e. they're showing up in network browsing, still working as login servers etc. etc.).
One long-haired git at your service...