1) Create a shared folder on window box.
2) Login to UNIX server as a root user and create an directory as below.
mkdir -p /mnt/test
3) Then start the smb services.
orarac2:/mnt/test # service smb status
Checking for Samba SMB daemon running
orarac2:/mnt/test #
4) Check the window server accessiable from Linux box.
nmblookup -A 192.168.223.34
Looking up status of 192.168.223.34
SV-L-ANUJ – B
WORKGROUP – B
SV-L-ANUJ – B
WORKGROUP – B
MAC Address = 00-21-70-BA-12-99
5) Then put the entry for hostname name in /etc/hosts , which is recognized on network. From above “SV-L-ANUJ” hostname recognized on network.
cat >> /etc/hosts
192.168.223.34 SV-L-ANUJ
Ctrl + c
6) Checking the accessiablity of server name and username of window box from Linux Box.
smbclient -L SV-L-ANUJ -U Anuj
Password: / give the password of Window Box user account
Domain=[SV-L-ANUJ] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
Sharename Type Comment
——— —- ——-
E$ Disk Default share
IPC$ IPC Remote IPC
F$ Disk Default share
anuj Disk
ADMIN$ Disk Remote Admin
C$ Disk Default share
DATA (E) Disk
Domain=[SV-L-ANUJ] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]
Server Comment
——— ——-
Workgroup Master
——— ——-
7) Then mount the window drive from Linux:
orarac2:/mnt/test # mount -t smbfs -o username=Anuj,password=password //SV-L-ANUJ/anuj /mnt/test
orarac2:/mnt/test # df -h
Filesystem Size Used Avail Use% Mounted on
/dev/hda5 9.9G 3.6G 5.8G 39% /
udev 506M 188K 506M 1% /dev
/dev/hda1 388M 30M 338M 9% /boot
/dev/hda7 4.0G 3.1G 723M 82% /home
/dev/hda8 9.9G 7.2G 2.2G 77% /opt
/dev/hda9 4.0G 2.1G 1.7G 55% /tmp
/dev/hda11 18G 17G 63M 100% /u01
/dev/hda12 18G 18G 14M 100% /u02
/dev/hda6 9.9G 8.0G 1.5G 85% /usr
//192.168.223.34/anuj
32G 30G 2.8G 92% /mnt/test
If any one want it to use for oracle backup and all, they can configure to access like below to allow oracle user to access the drive with full permission.
# mount -t cifs -o forcedirectio,username=anuj,password=password,uid=oracle,gid=dba,file_mode=0770,dir_mode=0770 //SV-L-ANUJ/anuj /mnt/test
Thanks to all, hope it will help to all of you to improve your Tech skill.