Solved

LINUX

Posted on 2013-11-21
1
423 Views
Last Modified: 2013-11-27
Hi:

I have implemented SAMBA server in my organization; Let me give detail about scenario

I have created
2 folder name abc-common and xyz-common
2 group abccommon and xyzcommon

now i want if user of abcommon goes to xyz-common and create one folder then owner and may of abcommon but group owner should xyzcommon only.

Please guide me.
0
Comment
Question by:Sanjeev jha
1 Comment
 
LVL 6

Accepted Solution

by:
xeroxzerox earned 500 total points
ID: 39668064
install samba
#yum install samba* -y

Configure a fully accessed anonymous share
# mkdir -p /make a dir
# chmod -R 0777 /dir name

Edit and add the following lines in samba config file as shown below
vi /etc/samba/smb.conf

unix charset = UTF-8
dos charset = CP932
workgroup = WORKGROUP
hosts allow = 127. 192.168.1.
security = share

[myshare]
path = /your share dir
writable = yes
browsable = yes
guest ok = yes
guest only = yes
create mode = 0777
directory mode = 0777

Start samba server
/etc/init.d/smb start
/etc/init.d/nmb start
chkconfig smb on
chkconfig nmb on

Test the Samba server
We can test the Samba server configuration using the command ‘testparm’.

Allow Samba server through firewal
# vi /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 137 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p udp --dport 138 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 139 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 445 -j ACCEPT
-A INPUT -s 192.168.1.0/24 -m state --state NEW -p tcp --dport 901 -j ACCEPT
-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT

Restart iptables to save the changes
service iptables restart

Now you are able to share

Configure a authenticated share using samba server
# useradd user1
# groupadd smbgroup
# usermod -a -G smbgroup user1
# smbpasswd -a user1
New SMB password:
Retype new SMB password:
Added user user1..

for set permission do it
# mkdir /samba/share2
# chmod -R 0755 /share2/
# chown -R user1:smbgroup /share2/

Add the below lines at the bottom of samba config file.
[root@sambaserver ~]# vi /etc/samba/smb.conf
[secure]
path = /share2
writable = yes
browsable = yes
guest ok = no
valid users = @smbgroup

run testperm and restart the samba service
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

919 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now