How to provide samba shares
amba to share files from Unix(solaris) to Windows
for example we need to share a file(/volumes/v1/home1/tstusr2/publishing) under solaris(nlxsl299) to windows(199.6.144.158) and for speciifed windows users(testusr tstusr2)
1)check whether /etc/sfw/smb.conf file exits are not
a)cd /etc/sfw/
b) nlxs:a5627> cat smb.conf
comment = nlwsl600 to nlxsl299
host allow = 199.6.144.158
path = /volumes/v1/home1/tstusr2/publishing
valid users = testusr tstusr2
public = no
writable = yes
printable = no
create mask = 0765
you can cat if smb.conf file if exits otherwise we need to create smb.conf file (for creating smb.conf file cp -p smb.conf-example smb.conf)
c)svcs -a |grep -i samba
nlxs:a5627> svcs -a |grep -i samba
enable Feb_15 svc:/network/samba:default
nlxsl299:a511627>
d)svcadm refresh svc:/network/samba:default
cat /etc/hosts |grep -i 199.6.144.158
199.6.144.158
To find out shares from unix server
nlxs:a5627>smbclient -L localhost -N
For checking smbastatus
=========================================================================================================
Instructions :
confirm from the user from uinx server we need to share file to which windows server ask IP of windows server
confirm what permisiion should samba shared filesystem should be there
confrim for which users we need to give samba shares
confrim for which specific host samba should be shared
check whether windows Ip is there in etc/hosts file of server otherwise add it to hosts file
comment = nlwsl600 to nlxsl299-------------------------------------------give commnet related to share its not mandiatory
host allow = 199.6.144.158--------------------------------------------Windows server Ip to which we are sharing files from solaris (nlxsl299) if we want to allow share for all machines jst ignore hosts allow
path = /volumes/v1/home1/tstusr2/publishing---------------------------Files to be shared
valid users = testusr tstusr2-----------------------------------------We are giving access to share to this specified users in windows machine
public = no-----------------------------------------------------------if Public=no nobody can share it accept valid users
writable = yes---------------------------------------------------------users are having write permissions
printable = no----------------------------------------------------------its not printable
create mask = 0765-----------------------------------------------permission to that file
To find out shares from unix server
# smbclient -L localhost -N
Anonymous login successful
Domain=[USD] OS=[Unix] Server=[Samba 3.6.4]
Sharename Type Comment
--------- ---- -------
GIS-Samba Disk GIS Samba Share----------------files which are shared
ESB-attachments Disk ESB Samba Share
IPC$ IPC IPC Service (Samba Server)
Anonymous login successful
Domain=[USD] OS=[Unix] Server=[Samba 3.6.4]
to find out to which windows machine we shared files from unix server
#
# smbstatus
Samba version 3.6.4
PID Username Group Machine
-------------------------------------------------------------------
15150 gsmb-in gsmb nlgispap1 (161.89.90.23)
Service pid machine Connected at
-------------------------------------------------------
IPC$ 15150 nlgispap1 Mon Feb 18 06:58:45 2013
GIS-Samba 15150 nlgispap1 Sun Feb 17 10:54:40 2013
No locked files
No comments:
Post a Comment