SOURCECODEBD.NET

Live Experience

SAMBA FULL ACCESS DIRECTORY:
------------------------

[root@lan ~]# yum -y install samba
[root@lan ~]# mkdir /home/share
[root@lan ~]# chmod 777 /home/share
[root@lan ~]# vi /etc/samba/smb.conf
 
# line 58: add the line
unix charset = UTF-8
dos charset = CP932
 
# line 75: change (Windows' default)
workgroup = WORKGROUP
 
# line 81: change IP address you permit
hosts allow = 127. 10.0.0. 192.168.192.
 
# line 102: change
security = share
 
# add these lines at the bottom
 
[Share] # any name you like
path = /home/share # shared directory
writable = yes # OK to write
guest ok = yes # guest OK
guest only = yes # guest only
create mode = 0777 # fully accessed
directory mode = 0777 # fully accessed
share modes = yes
 
[root@lan ~]# /etc/rc.d/init.d/smb start
[root@lan ~]# chkconfig smb on
-------------------------------------
 
LIMITED DIRECTORY
-----------------
 
[root@lan1 ~]# groupadd security
[root@lan1 ~]# mkdir /home/security
[root@lan1 ~]# chgrp security /home/security
[root@lan1 ~]# chmod 2770 /home/security
[root@lan1 ~]# vi /etc/samba/smb.conf
 
# line 102: change
security = user
 
# add these lines at the bottom
 
[Security] # any name you like
   comment = Public Stuff   
   path = /home/security
   writable = yes
   create mode = 0770
   directory mode = 0770
   share modes = yes
   printable = no   
   guest ok = no # guest not allowed
   valid users = @security # allow only security group
 
[root@lan1 ~]# /etc/rc.d/init.d/smb restart
[root@lan1 ~]# smbpasswd -a fedora # set password
[root@lan1 ~]# vi /etc/group
security:x:502:fedora # add
-------------------------------------------
 
####if you want add more users then####
 
[root@lan1 ~]# mkdir /sambasohan
[root@lan1 ~]# chgrp security /sambasohan
[root@lan1 ~]# chmod 2770 /sambasohan
[root@lan1 ~]# vi /etc/samba/smb.conf
 
(ADD THIS LINE AT BOTTOM)
 
[sohan]
   comment = Public Stuff
   path = /sambasohan
   writable = yes
   create mode = 0770
   directory mode = 0770
   share modes = yes
   printable = no
   guest ok = no
   valid users = @security
 
[root@lan1 ~]# smbpasswd -a sohan
[root@lan1 ~]# vi /etc/group
security:x:502:fedora,sohan
[root@lan1 ~]# /etc/rc.d/init.d/smb restart
----------------------------------
You are here: Home / Fedora / Install and Configure SAMBA on Fedora