Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
I am using RHEL 5.2 server, I need two shares on it one share should be access by all office guy, and otherone should require authentication (samba user & password) from windows xp. I need your help, please do needful for me.
I am using RHEL 5.2 server, I need two shares on it one share should be access by all office guy, and otherone should require authentication (samba user & password) from windows xp. I need your help, please do needful for me.
Thanks
Shakir
System Administrator
Easiest ways: install samba-swat (web front end) and use that....or even system-config-samba.
To configure with swat, go to
Code:
http://localhost:901
Quickest way is editing the /etc/samba/smb.conf
There are plenty of examples in there where you can uncomment lines and add extra directives to get some of those samples working.
for authentication based sharing you would need to make the samba server as a PDC (Primary Domain Controller) and for a simple share you just uncomment the samples share in the end of smb.conf file.
for authentication based sharing you would need to make the samba server as a PDC (Primary Domain Controller) and for a simple share you just uncomment the samples share in the end of smb.conf file.
Thanks for your reply, is there anyway to make these share without making linux machine PDC. Actually this a workstation i have installed two HDD on it one is 320 GB and other is 1 TB. The drive which is 1 TB is for everyone but 320 GB drive only for one group which require authentication. can you help me in this.
Thanks for your reply, is there anyway to make these share without making linux machine PDC. Actually this a workstation i have installed two HDD on it one is 320 GB and other is 1 TB. The drive which is 1 TB is for everyone but 320 GB drive only for one group which require authentication. can you help me in this.
Thanks
Shakir
you have to use the
Code:
guest ok = yes
directive for shares without user/pass.
Other shares, you add the user/pass using
Code:
smbpasswd -a user
You have to mix and match with the examples already provided in the /etc/samba/smb.conf file.
example: look for the sample config for sharing homes.
for authentication based samba you need to make it as PDC.
is this correct??
i run samba in many locations, and i have a PDC in none of them...
Code:
testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
passdb backend = tdbsam
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
@shahz: This is not necessary at all if you just want to access the shares using a locally known user on the Samba server. It's only necessary to set it up as a domain controller if you want to do authentication using domain users, like for example in a mixed Windows/Linux environment where you want the Windows users to be able to access the Linux Samba shares.
@linux4shakir
Create your users locally on the Linux box and change the smb.conf file to allow access to the shares according to your wishes. Just like centosboy has explained.
@shahz: This is not necessary at all if you just want to access the shares using a locally known user on the Samba server. It's only necessary to set it up as a domain controller if you want to do authentication using domain users, like for example in a mixed Windows/Linux environment where you want the Windows users to be able to access the Linux Samba shares.
@linux4shakir
Create your users locally on the Linux box and change the smb.conf file to allow access to the shares according to your wishes. Just like centosboy has explained.
is this correct??
i run samba in many locations, and i have a PDC in none of them...
Code:
testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Loaded services file OK.
Server role: ROLE_STANDALONE
Press enter to see a dump of your service definitions
[global]
workgroup = MYGROUP
server string = Samba Server Version %v
passdb backend = tdbsam
cups options = raw
[homes]
comment = Home Directories
read only = No
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
can you send me the complete smb.conf file where its not a PDC and it authenticates, it would be new for me also as I am a also learner.
The directory for the public share should be like the /tmp directory. You need to set the sticky bit. This will prevent one user from deleting another user's file.
You didn't indicate how many users this is for. That could determine the password database you want to use, and whether you want to use a domain. Also, consider how you want users to change their passwords. You need each Windows user to also be a Linux user. If you don't run a domain controller or Active Directory, how do you want changes in a users credentials to be replicated to samba? A domain controller, either this samba server, or one you have becomes a central source for validating credentials. That means when they change their password, they modify their credentials on the server. Otherwise, you need to run "smbpasswd" to change their password for them. If some of the computers are XP Home editions, this is what you will have to do. XP Home can't join a domain.
It is important to plan ahead, and understand how your network will operate with your design before you implement it. Also don't forget a backup plan. If you don't back up certain *.db files that samba uses, you will look everyones credentials if you upgrade in the future.
can you send me the complete smb.conf file where its not a PDC and it authenticates, it would be new for me also as I am a also learner.
all you need for now is your view your own smb.conf file.
go to the end and find the section for [homes]
normally it is all ready and set up.
all you need to do is add the smb user(s), start samba and ensure the relevant ports are allowing access.
like the post above says there are some security issues when it is for user(s) access rather then just a simple plain user.
once you see how this works, then you can begin to fine tune it properly with security in mind.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.