Solved

LINUX

Posted on 2013-11-21
1
427 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Simple, centralized multimedia control

Watch and learn to see how ATEN provided an easy and effective way for three jointly-owned pubs to control the 60 televisions located across their three venues utilizing the ATEN Control System, Modular Matrix Switch and HDBaseT extenders.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Check for Linux process in script 7 88
Disabling security updates Ubuntu 3 67
Master-Master-Slave BIND setup 2 76
Bash script to include windows servers 13 40
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

739 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