| Goals for this chapter: | rpm packages covered in this chapter:
|
SAMBA is an OpenSource project realized in the Australian National University by Andrew Tridgell.
The project includes a set of tools to integrate MS Windows systems with Linux. SAMBA belong to the Shared-Integration-Mode; that allows is sharing disk and printers.
Sharing a disk means that is possible to visualize a MS Windows shared directory on Linux and viceversa. Sharing a printer means that is possible to print from Linux on a MS Windows printer and viceversa.
The SAMBA team choose to realize this project to offer a complete solution to integrate both world. Different releases happens from 1997 to nowadays.
We cover here the version included with RedHat 7.2: 2.2.1a.
[root@ftosx1 root]# rpm -qi samba
Name
: samba
Relocations: (not relocateable)
Version : 2.2.1a
Vendor: Red Hat, Inc.
Release : 4
Build Date: Mon 13 Aug 2001 09:54:39 PM CEST
Install date: Wed 09 Jan 2002 02:18:39
PM CET Build Host: stripples.devel.redhat.com
Group
: System Environment/Daemons Source RPM: samba-2.2.1a-4.src.rpm
Size
: 3968626
License: GNU GPL Version 2
Packager : Red Hat,
Inc. <http://bugzilla.redhat.com/bugzilla>
URL
: http://www.samba.org/
Summary : The
Samba SMB server.
Description :
Samba is the protocol by which a lot of
PC-related machines share
files, printers, and other information
(such as lists of available
files and printers). The Windows NT, OS/2,
and Linux operating systems
support this natively, and add-on packages
can enable the same thing
for DOS, Windows, VMS, UNIX of all kinds,
MVS, and more. This package
provides an SMB server that can be used
to provide network services to
SMB (sometimes called "Lan Manager") clients.
Samba uses NetBIOS over
TCP/IP (NetBT) protocols and does NOT
need the NetBEUI (Microsoft Raw
NetBIOS frame) protocol.
[root@ftosx1 root]#
The NetBUI stand for NetBIOS Extended User Interface.
However, is important to remark that the integration between MS Windows and Linux is equivalent to the integration between Linux and Novell or the integration between Linux and AppleTalk; some people are companies play exaggerated attention to this "normal" integration available using other products from 1992 or before.
The SAMBA programs are the following:
Before to start to work with SAMBA is fundamental to lauch the service (or daemon).
Simply, update the boot configuration adding the "smb" service and reboot your system ...
Or better, simply run the command:
[root@ftosx1 root]# /etc/rc.d/init.d/smb start
Starting SMB services:
[ OK ]
Starting NMB services:
[ OK ]
[root@ftosx1 root]#
Is important to explain that if we change, for example the file: "/etc/samba/smb.conf", we need to restart the service:
[root@ftosx1 root]# /etc/rc.d/init.d/smb restart
Shutting down SMB services:
[ OK ]
Shutting down NMB services:
[ OK ]
Starting SMB services:
[ OK ]
Starting NMB services:
[ OK ]
[root@ftosx1 root]#
You can check this running the command:
[root@ftosx1 root]#
[root@ftosx1 root]# ps axu | grep smb
root 1591 0.0 0.9
3252 1168 ? S
20:57 0:00 smbd -D
root 1658 0.0 0.4
1728 592 pts/5 S 21:01
0:00 grep smb
[root@ftosx1 root]#
To get full advantage of SAMBA service, both "smbd" and "nmbd" must run:
[root@ftosx1 root]# ps ax | grep mb
1227 ? S
0:00 smbd -D
1232 ? S
0:00 nmbd -D
1732 pts/2 S
0:00 grep mb
[root@ftosx1 root]#
Now that SAMBA is running the daemon smdb will look for SAMBA Volumes in the local network. There are no limits for volumes or users.
We can start to browse these volumes running the command: nmblookup.
This program may be used at different level of lookup in the SAMBA sense. Of course the name of the remote MS Windows machine must be know before to run the command.
For example, we can run in the most elementary mode:
[root@ftosx1 root]# nmblookup FUTURE-6NWYKXME
querying FUTURE-6NWYKXME on 192.168.1.255
192.168.1.60 FUTURE-6NWYKXME<00>
[root@ftosx1 root]#
We can add the "-T" to translate the remote address using the local "/etc/hosts" table.
[root@ftosx1 root]# nmblookup FUTURE-6NWYKXME -T
querying FUTURE-6NWYKXME on 192.168.1.255
world.futuretg.com, 192.168.1.60 FUTURE-6NWYKXME<00>
[root@ftosx1 root]#
... and of course we can run it in debug mode at level 4, for example getting important and fundamental information:
[root@ftosx1 root]# nmblookup FUTURE-6NWYKXME -T -d 4
Initialising global parameters
params.c:pm_process() - Processing configuration file "/etc/samba/smb.conf"
Processing section "[global]"
doing parameter workgroup = WORKGROUP
doing parameter server string = Samba Server
doing parameter printcap name = /etc/printcap
doing parameter load printers = yes
doing parameter printing = lprng
doing parameter guest account = pcguest
doing parameter log file = /var/log/samba/%m.log
doing parameter max log size = 400
doing parameter security = user
doing parameter password level = 8
doing parameter username level = 8
doing parameter encrypt passwords = yes
doing parameter smb passwd file = /etc/samba/smbpasswd
doing parameter obey pam restrictions = no
doing parameter socket options = TCP_NODELAY SO_RCVBUF=8192
SO_SNDBUF=8192
doing parameter logon path = \\%L\Profiles\%U
doing parameter dns proxy = no
pm_process() returned Yes
added interface ip=192.168.1.93 bcast=192.168.1.255 nmask=255.255.255.0
bind succeeded on port 0
Socket opened.
querying FUTURE-6NWYKXME on 192.168.1.255
nmb packet from 192.168.1.60(137) header: id=2201 opcode=Query(0)
response=Yes
header: flags: bcast=No rec_avail=No rec_des=Yes
trunc=No auth=Yes
header: rcode=0 qdcount=0 ancount=1 nscount=0
arcount=0
answers: nmb_name=FUTURE-6NWYKXME<00>
rr_type=32 rr_class=1 ttl=300000
answers 0 char `....<
hex 6000C0A8013C
Got a positive name query response from 192.168.1.60 ( 192.168.1.60
)
world.futuretg.com, 192.168.1.60 FUTURE-6NWYKXME<00>
[root@ftosx1 root]#
Of course, the remote system is not an alien ... you can also ping it:
[root@ftosx1 root]# ping world
PING world.futuretg.com (192.168.1.60) from 192.168.1.93 : 56(84)
bytes of data.
Warning: time of day goes back, taking countermeasures.
64 bytes from world.futuretg.com (192.168.1.60): icmp_seq=0
ttl=128 time=947 usec
--- world.futuretg.com ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max/mdev = 0.947/0.947/0.947/0.000 ms
[root@ftosx1 root]#
On the remote MS Windows 2000 are installed the "standard" Microsoft protocols as well as the "TCP/IP" protocol.
The SAMBA Configuration file: "/etc/samba/smb.conf".
SAMBA works in a very simple mode.
To share on Linux, the MS Windows 2000 volumes, these volumens must be shared on the MS Windows 2000 machine.
To browse on MS Windows 2000, the Linux volumes, these must be declared on Linux. The file to declare these Linux accessible MS Windows volumes is the file "/etc/samba.smb.conf".
In previous editions the file was present in "/etc" instead of "/etc/samba", like actual.
These files includes both configuration parameters as well the volumes to share.
For example, if we want to share to the MS Windows 2000 world, a locall Linux directory called samba, we may run two commands:
[root@ftosx1 root]# adduser samba
[root@ftosx1 root]#
That is more easy and effective.
Be sure that the Workgroup is the same ... otherwise you will see another group in the MS Windows "Networks near to me"
There are nothing magic about SAMBA, users and passwords. If you are on MS Windows and try to browse a Linux shared volume, the login and password for this purpose will be passwords on the "Linux" system.
The same is valid from Linux. If you access the MS Windows system from Linux, the
Generally, non-important changes are necessary. However, we includes a complete configuration file on "ExternalContribs"
To share a Linux directory that will be accessible from MS Windows, we need to uncomment it.
For example, if you want access a Linux public directory simply uncomment the following entries:
# A publicly accessible directory, but read only, except for
people in
# the "staff" group
[public]
comment = Public Stuff
path = /home/samba
public = yes
writable = yes
printable = no
write list = @staff
Generally no other changes are needed.
One of fundamental confusion problem is the password. As we explain password regards the relative machine when we access.
However, there are different modes to handle the security and the levels.
You can use:
security = user
and
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
Another fundamental difference and important comment is the "lowercase" and "UPPERCASE" passwords. Windows comes from DOS a UPPERCASE system.
SAMBA uses the internal word:
password level = 8
to count the number of UPPER CASE letters allowed in the password.
You can solve this using "lowercase" password on Windows or moving the number of UPPERCASE letters to 8, to avoid any problem.
No other important changes are needed.
SAMBA includes a program to test or to check the SAMBA configuration file. It is called 'testparm"
We can do both check and generate a new one.
[root@ftosx1 root]# testparm
Load smb config files from /etc/samba/smb.conf
Processing section "[homes]"
Processing section "[printers]"
Processing section "[tmp]"
Processing section "[public]"
Loaded services file OK.
Press enter to see a dump of your service definitions
/tmp/mylatestsamba.conf
# Global parameters
[global]
coding system =
client code page
= 850
code page directory
= /usr/share/samba/codepages
workgroup = WORKGROUP
netbios name =
netbios aliases =
netbios scope =
server string = Samba
Server
interfaces =
bind interfaces only
= No
security = USER
encrypt passwords
= Yes
update encrypted
= No
allow trusted domains
= Yes
hosts equiv =
min passwd length
= 5
map to guest = Never
null passwords =
No
obey pam restrictions
= No
password server =
smb passwd file =
/etc/samba/smbpasswd
root directory =
pam password change
= No
passwd program =
/bin/passwd
passwd chat = *new*password*
%n\n *new*password* %n\n *changed*
passwd chat debug
= No
username map =
password level =
8
username level =
8
unix password sync
= No
restrict anonymous
= No
lanman auth = Yes
use rhosts = No
log level = 2
syslog = 1
syslog only = No
log file = /var/log/samba/%m.log
max log size = 400
timestamp logs =
Yes
debug hires timestamp
= No
debug pid = No
debug uid = No
protocol = NT1
large readwrite =
No
max protocol = NT1
min protocol = CORE
read bmpx = No
read raw = Yes
write raw = Yes
nt smb support =
Yes
nt pipe support =
Yes
nt acl support =
Yes
announce version
= 4.5
announce as = NT
max mux = 50
max xmit = 65535
name resolve order
= lmhosts host wins bcast
max packet = 65535
max ttl = 259200
max wins ttl = 518400
min wins ttl = 21600
time server = No
change notify timeout
= 60
deadtime = 0
getwd cache = Yes
keepalive = 300
lpq cache time =
10
max smbd processes
= 0
max disk size = 0
max open files =
10000
read size = 16384
socket options =
TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
stat cache size =
50
total print jobs
= 0
load printers = Yes
printcap name = /etc/printcap
enumports command
=
addprinter command
=
deleteprinter command
=
show add printer
wizard = Yes
os2 driver map =
strip dot = No
character set =
mangled stack = 50
stat cache = Yes
domain admin group
=
domain guest group
=
machine password
timeout = 604800
add user script =
delete user script
=
logon script =
logon path = \\%L\Profiles\%U
logon drive =
logon home = \\%N\%U
domain logons = No
os level = 20
lm announce = Auto
lm interval = 60
preferred master
= Auto
local master = Yes
domain master = Auto
browse list = Yes
enhanced browsing
= Yes
dns proxy = No
wins proxy = No
wins server =
wins support = No
wins hook =
kernel oplocks =
Yes
oplock break wait
time = 0
add share command
=
change share command
=
delete share command
=
config file =
preload =
lock dir = /var/cache/samba
default service =
message command =
dfree command =
valid chars =
remote announce =
remote browse sync
=
socket address =
0.0.0.0
homedir map = auto.home
time offset = 0
NIS homedir = No
source environment
=
panic action =
hide local users
= No
host msdfs = No
winbind uid =
winbind gid =
template homedir
= /home/%D/%U
template shell =
/bin/false
winbind separator
= \
winbind cache time
= 15
comment =
path =
alternate permissions
= No
username =
guest account = pcguest
invalid users =
valid users =
admin users =
read list =
write list =
printer admin =
force user =
force group =
read only = Yes
create mask = 0744
force create mode
= 00
security mask = 0777
force security mode
= 00
directory mask =
0755
force directory mode
= 00
directory security
mask = 0777
force directory security
mode = 00
inherit permissions
= No
guest only = No
guest ok = No
only user = No
hosts allow =
hosts deny =
status = Yes
max connections =
0
min print space =
0
strict sync = No
sync always = No
write cache size
= 0
max print jobs =
1000
printable = No
postscript = No
printing = lprng
print command = lpr
-r -P%p %s
lpq command = lpq
-P%p
lprm command = lprm
-P%p %j
lppause command =
lpresume command
=
queuepause command
=
queueresume command
=
printer name =
printer driver =
printer driver file
= /etc/samba/printers.def
printer driver location
=
default case = lower
case sensitive =
No
preserve case = Yes
short preserve case
= Yes
mangle case = No
mangling char = ~
hide dot files =
Yes
hide unreadable =
No
delete veto files
= No
veto files =
hide files =
veto oplock files
=
map system = No
map hidden = No
map archive = Yes
mangled names = Yes
mangled map =
browseable = Yes
blocking locks =
Yes
fake oplocks = No
locking = Yes
oplocks = Yes
level2 oplocks =
Yes
oplock contention
limit = 2
posix locking = Yes
strict locking =
No
share modes = Yes
copy =
include =
exec =
preexec close = No
postexec =
root preexec =
root preexec close
= No
root postexec =
available = Yes
volume =
fstype = NTFS
set directory = No
wide links = Yes
follow symlinks =
Yes
dont descend =
magic script =
magic output =
delete readonly =
No
dos filemode = No
dos filetimes = No
dos filetime resolution
= No
fake directory create
times = No
vfs object =
vfs options =
msdfs root = No
[homes]
comment = Home Directories
valid users = %S
read only = No
create mask = 0664
directory mask =
0775
browseable = No
[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No
[tmp]
comment = Temporary
file space
path = /tmp
read only = No
guest ok = Yes
[public]
comment = Public
Stuff
path = /home/samba
write list = @staff
read only = No
guest ok = Yes
[root@ftosx1 root]#
Browse your Linux box from MS Windows
The SAMBA daemon using the NETBIOS entries (Be sure these entries are present in your "/etc/services" file), to access MS Windows Systems:
[root@ftosx1 root]# more /etc/services | grep netbios
netbios-ns 137/tcp
# NETBIOS Name Service
netbios-ns 137/udp
netbios-dgm 138/tcp
# NETBIOS Datagram Service
netbios-dgm 138/udp
netbios-ssn 139/tcp
# NETBIOS session service
netbios-ssn 139/udp
[root@ftosx1 root]#
... and transform the Linux box in a MS Window box ... from the NetBIOS recognition point of view.
After the Linux system is up and share it ... MS Windows will see it as a MS Windows NetBIOS volume

Graphically on MS Windows 2002 we have:
![]() |
![]() |
| Clicking on on "Computer Near Me" ... we will get! | This screen show both the remote Linux box: FTOSX ... and also Future-6n... that is the MS Windows that share itself. |
Clicking on FTOSX1, we will get a login/password mask. The login and password will be the "Linux" login and password.

Once we enter we will get:

These folder are available because we share it from the "/etc/samba/smb.conf" file.
[tmp]
comment = Temporary
file space
path = /tmp
read only = No
guest ok = Yes
[public]
comment = Public
Stuff
path = /home/samba
write list = @staff
read only = No
guest ok = Yes
[root@ftosx1 root]#
... if we choose "root" we will get the "/root" Linux directory from MS Windows ... drag-and-drop operations are full available on the fly!

We can also choose the Future-6nwykxme system.

If we run "smbstatus" we will get:
[root@ftosx1 root]# smbstatus
Samba version 2.2.1a
Service uid
gid pid machine
----------------------------------------------
IPC$ root
root 1910 future-6nwykxme (192.168.1.60)
Fri Apr 5 15:50:32 2002
No locked files
[root@ftosx1 root]#
Browse your MS Windows system from Linux
Before we start or plan to visualize in some mode MS Windows folder
on Linux, we need to share it on MS Windows, and then back to Linux and
mount it!.
![]() |
![]() |
| Normal view after the sharing | To share click on the folder and Choose Properties -> Sharing.
Click on "Apply" after you finish. |
You can also share the entire disk.
![]() |
![]() |
Is also possible to share the folder with different names.
Once these MS Windows are shared and visible ... we can access it from Linux!
Simply run the following command ... the password will be the MS Windows password.
[root@ftosx1 root]# smbclient //FUTURE-6NWYKXME/My_Documents
-U Administrator
added interface ip=192.168.1.93 bcast=192.168.1.255 nmask=255.255.255.0
Got a positive name query response from 192.168.1.60 ( 192.168.1.60
)
Password:
Domain=[WORKGROUP] OS=[Windows 5.0] Server=[Windows 2000 LAN
Manager]
smb: \> ls
.
D 0 Sat Jan 19 10:23:34
2002
..
D 0 Sat Jan 19 10:23:34
2002
My Pictures
DR 0 Thu Jan 31 10:40:12
2002
MARC msg 'Qt-only KDE applications'.htm
A 5505 Tue Jan 22 11:36:08 2002
KLUWER academic publishers Number Theory and Its
Applications_files D
0 Sat Jan 26 09:54:28 2002
KLUWER academic publishers Number Theory and Its
Applications.htm A 20823
Sat Jan 26 09:54:28 2002
Birkhauser - Number Theory_files
D 0 Sat Jan 26 09:56:04
2002
Birkhauser - Number Theory.htm
A 6364 Sat Jan 26 09:56:04 2002
Bernoulli Bibliography K.htm
A 46060 Sat Jan 26 09:58:08 2002
Linux PR Brazilian developer becomes the new maintainer
of the Linux Kernel_files D
0 Tue Jan 29 12:59:04 2002
Trolltech - Training - Sample Course_files
D 0 Tue Jan 29 13:02:04
2002
Trolltech - Training - Sample Course.htm
A 23264 Tue Jan 29 13:02:06 2002
Delibera n_ 25-01-CIR - Disposizioni in merito allintroduzione
nellofferta di interconnessione di riferimento del servizio di raccolta
su base forfetaria per il traffico internet_files
D 0 Fri Feb 1 12:53:32
2002
Delibera n_ 25-01-CIR - Disposizioni in merito allintroduzione
nellofferta di interconnessione di riferimento del servizio di raccolta
su base forfetaria per il traffico internet.htm
A 63185 Fri Feb 1 12:53:36 2002
Flat_ITALY
D 0 Fri Feb 1 12:58:22
2002
New Folder
D 0 Wed Mar 6 06:18:06
2002
49447 blocks of size 32768. 4684 blocks available
smb: \>
Generally "smart" programs includes a help, that become available
smb: \> ?
ls
dir du
lcd cd
pwd
get mget
put mput
rename more
mask del
open
rm
mkdir md
rmdir rd
prompt recurse
translate lowercase
print
printmode queue
cancel quit
q
exit
newer archive
tar blocksize
tarmode setmode
help ?
history
!
smb: \>
Is possible to create directories from Linux.
smb: \> mkdir I_can_create_dirs_from_Linux
We can list local files!
smb: \> !ls
1
Immagine_all_the_Linux_Concepts.txt netscape2.ps
100_Question_with_Answer.html index.html
netscape.ps
11.html
install641D_linux_intel.tar.gz new_left_bar.png
1.png
InvioPIN.ps
nohup.out
2
k3b-0.6.0pre2.tar.gz
normal
845diag.gif
kmatplot-0.3.1-1.src.rpm
nozzle.gif
850_block_diagram.gif
konqueror_smb2.png
nsmail
actual_modules
konqueror_smb3.png
nsmail.libero
actual_modules2
konqueror_smb_passwd.png
OLD
add_Documents+Applications.png krpmbuilder-0.2.6
OpenOffice.org641
anaconda-ks.cfg
krpmbuilder-0.2.6.tar
passwd
araguaney.doc
krusader-1.01-1-kde2.src.rpm
PC%20APRIL.doc
archive.part
kwintv-0.8.11.tar.bz2
poem.png
atlantik-0.2.0
lizard-20011210-3.src.rpm
pop
atlantik-0.2.0.tar.gz
LJ
POP
banner.msg
lst.cnf
proc_modules
boxes.gif
MacOSX10.1
prod_top.gif
build_linux.html
Mail
prod_top_iman.jpg
cabinet nero shark.zip
manual.html
prod_top_overview.gif
calendar-0.15.tar.gz
man_w_integrity_87x75.gif
productgrid.gif
close12.jpg
mbox
rnav_related.gif
confi_no_modules
menu2.gif
shark_1.jpg
CURRICULUM%20VITAE.doc
Modulo_inscrizione.pdf
shark_2.jpg
CWI_Ital.pdf
Modulo_inscrizione.ps
shark_3.jpg
dell_last.txt
monta_anche_i_vol.png
shark_4.jpg
dell.txt
mp3kult-0.7.1-2.src.rpm
Sito.ps
Desktop
mp3kult-0.6.1-2.src.rpm
slackware.gif
dot.gif
mycc-0.8.2-alpha-linux
snapshot1.png
Drag_an_Drop
mycc-0.8.2-alpha-linux.tar.gz
ssb.png
Educating_Bulls.txt
mycc-0.8.2-alpha-src
staroffice6.0
Expect_Reference
mycc-0.8.2-alpha-src.tar.gz
tagline.gif
Forse_Allascano.ps
MyLibrary
TeXmacs-1.0-1.src.rpm
ftlc_sysadm.gif
My Pictures
TeXmacs-fonts-1.0-1.src.rpm
FTLinuxCourse_Complete-2002 mysql_default
uni_02.jpg
FTLinuxCourse_Complete-2002.tgz nav_products.gif
Visura.ps
g4.png
nav_products_resources.gif
Xterminal-1.0.6-1.src.rpm
home_logo.gif
nav_search.gif
I100_Question_with_Answer.html netatalk_asun-1.4.99-5.src.rpm
smb: \>
You can transfer files from Linux to MS Windows 2000, using "mput".
smb: \I_can_create_dirs_from_Linux\> mput dot.gif
Put file dot.gif? y
putting file dot.gif as \I_can_create_dirs_from_Linux\dot.gif
(0.9 kb/s) (average 0.9 kb/s)
smb: \I_can_create_dirs_from_Linux\> ls
.
D 0 Wed Apr 3 00:43:32
2002
..
D 0 Wed Apr 3 00:43:32
2002
dot.gif
A 43 Wed Apr 3 00:50:00
2002
49447 blocks of size 32768. 4400 blocks available
smb: \I_can_create_dirs_from_Linux\>
In the same mode you can transfer files from MS Windows from Linux using "mget".
For example to enter in the directory "My Pictures" that contains spaces we can use the quotes:
smb: \> cd "My Pictures"
smb: \My Pictures\>
To exit the smbclient session you can enter: "quit".
smb: \I_can_create_dirs_from_Linux\> quit
[root@ftosx1 root]#
The Konqueror also supports the smb protocol.
Therefore entering the command: smb://FUTURE-6NWYKXME/My_Documents/ we will get a password mask, completely equivalent to the MS Windows password mask!

If the password is correct we will get, inside the konqueror the MS
Windows directory:

we can also enter in My Pictures and get a preview of the remote MS Windows images ... from the konqueror!

The state after these connections (MS Windows logged on Linux (ICS$) and Linux logged into MS Window "root" is the following:
[root@ftosx1 root]# smbstatus
Samba version 2.2.1a
Service uid
gid pid machine
----------------------------------------------
root root
root 1910 future-6nwykxme (192.168.1.60)
Fri Apr 5 16:50:59 2002
IPC$ root
root 1910 future-6nwykxme (192.168.1.60)
Fri Apr 5 15:50:32 2002
No locked files
[root@ftosx1 root]#
To print on Linux from MS Windows, is necessary to enter in the printer
section in FTOSX and re-install the printer. We follows here most important
steps.
![]() |
![]() |
![]() |
![]() |
From now any MS Windows may be printer on the Linux printer. The reverse
feature print from Linux on MS Windows is more simple. You simply need
to uncomment the printer section on the smb.conf file are restart the service.
Mounting remote Window directories with Linux "mount"
Smart Linux customers write an extension to the Linux "mount" command, that allows to mount like a NFS mode, remote MS Windows volumes on Linux, running a simple mount command:
Is very simple, a similar to NFS with the difference that you will get a password prompt.
You start creating the local directory where we will mount the remote MS Windows "My Documents" folder.
[root@ftosx1 root]# mkdir /mnt/remote_windows2000
Now, we run the command:
[root@ftosx1 root]# mount -t smbfs -o username=Administrator,bodhi1
//FUTURE-6NWYKXME/My_Documents /mnt/remote_windows2000
Password:
If we move to the directory we will get the remote "My Documents" folder.
[root@ftosx1 root]# cd !$
cd /mnt/remote_windows2000
[root@ftosx1 remote_windows2000]# ls
Bernoulli Bibliography K.htm
Birkhauser - Number Theory_files
Birkhauser - Number Theory.htm
Delibera n_ 25-01-CIR - Disposizioni in merito all'introduzione
nell'offerta di interconnessione di riferimento del servizio di raccolta
su
base forfetaria per il traffico internet_files
Delibera n_ 25-01-CIR - Disposizioni in merito all'introduzione
nell'offerta di interconnessione di riferimento del servizio di raccolta
su
base forfetaria per il traffico internet.htm
Flat_ITALY
I_can_create_dirs_from_Linux
KLUWER academic publishers Number Theory and Its Applications_files
KLUWER academic publishers Number Theory and Its Applications.htm
Linux PR Brazilian developer becomes the new maintainer of the
Linux Kernel_files
MARC msg 'Qt-only KDE applications'.htm
My Pictures
New Folder
Trolltech - Training - Sample Course_files
Trolltech - Training - Sample Course.htm
[root@ftosx1 remote_windows2000]#
Is also possible to mount the remote MS Windows folder, automatically, using the BSD Automoter.
The AMD includes two files:
This file is very easy. The default file is:
[root@ftosx1 root]# more /etc/amd.net
/defaults fs:=${autodir}/${rhost}/root/${rfs};opts:=nosuid,nodev
* rhost:=${key};type:=host;rfs:=/
[root@ftosx1 root]#
To mount the remote MS Windows 2000 volume we need to add an entry equivalent to the following:
win-pubic type:=program;fs:=${autodir}/${key};\
mount:=/usr/sbin/smbmount smbmount //FUTURE-6NWYKXME/My_Documents
${fs} \
-P mypassword ;\
unmount:=/bin/umount umount ${fs}"
The ${fs} is the automatic directory where will be mounted and unmounted.
Check the Interactive Exam Cram Networking:
Internet Resources for this Chapter.