SAMBA server (139) [ linux – win/mac/linus sharing ]

SAMBA server (139) [ linux – win/mac/linus sharing ]

===============================================================================================

How to configure SAMBA server

1> yum install samba -y

2> create directory to share
#mkdir /software
#touch /software/nasa.txt

3> change SELinux directory type
#chcon -t samba_share_t /software -R

Recheck
#ls -Zd /software

4> create samba user
#useradd susan
#smbpasswd -a susan
enter password twice

5> #vim /etc/samba/smb.conf

workgroup=SMBGROUP => any name in capitabl

goto last line (shift + G)

[soft]  ====================> any share name
comment=windows software ===> any comment
path=/software
public=yes    ===============> yes/no as per requirement
writable=yes
printable=no
write list= +hr =============>allow only hr group

hosts allow=192.168.0 ========> network to allow access
browseable=yes
hosts deny =192.168.0.1 =======>deny access to IP

valid users=susan

:wq

6> #service smb restart

7> #chkconfig smb on

check configuration file syntax
#testparm

===============================================================================================

client side settings

Linux machine

1> command line
#yum install samba-client
#smbclient //192.168.0.130/soft -U susan => #smbclient //sambeserver_IP/share_name -U samba_user

enter password twice
smb:\>
quit to exit

2> graphical
-place -> connect to server
server type = window share
server = 192.168.0.130
folder = soft [ share name]
username = susan
domain name = SMBGROUP

-enter connect
-enter password

===============================================================================================
Extra
1> remove smb password
#smbpasswd -X susan

2> check connection
#smbstatus

3> samba tree
#smbtree
Or
#smbclient -L //192.168.0.130/soft -N
============================================================================================

client settings for windows machine
=> start -> Run -> \\192.168.0.130
=> enter username and password

==========================================================================================

windows to linux sharing
#smbclient -U kishor //192.168.0.10/d

==========================================================================================

Posted in servers

Leave a Reply