P. 1
Linux Certification Bible

Linux Certification Bible

4.0

|Views: 2.327|Likes:
Publicado porMarcelo

More info:

Published by: Marcelo on Dec 18, 2008
Direitos Autorais:Attribution Non-commercial

Availability:

Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less

01/17/2013

pdf

text

original

The SMB/CIFS client is part of the Samba suite and can be selected during installa-
tion. This package can also be added to a system by using one of the methods dis-
cussed in Chapter 5. The SMB/CIFS clientcan access an SMB/CIFS/CIFS server. It
offers an interface similar to that of the ftpprogram. The SMB/CIFS clientcom-
mand launches the client Table 7-2 lists the switches needed for connection. The
switches are listed in order of use from closest to the command to furthest from the
command; the table also includes a description of the switch for the SMB/CIFS
client software.

114881-6 ch07.F 11/12/01 8:30 AM Page 233

234Part III ✦Configuration

Table 7-2

SMB/CIFS Client Switches

Switch

Description

Example

servicename

The service that you want to use on the

//server/service

server in the format of a NetBIOS name.

password

The password required to access the

users password

specified service on the specified server.

-b

This option changes the transmit/send

-b 1500

buffer size when getting or putting a file
from/to the server. The default is
65520 bytes.

-d

The higher this value, the more detail

-d 1

will be logged to the log files about the
activities of the client, ranging from 0-10
and A.

-D

Change to initial directory before starting.

-D /tmp

-U

Sets the SMB/CIFS username or

-U user[%password]

username, often includes [%pass] to
include the password.

-W

Overrides the default workgroup specified -W usergroup
in the workgroup parameter of the
SMB/CIFS.conf file for this connection.

-M

This option sends messages to another

cat message.txt | SMB/CIFS

computer by using the WinPopup

client -M user

protocol.

-A

This option allows you to specify a file

-A filename

from which to read the username and
password used in the connection.

-N

Suppresses the normal prompt

-N

for password.

-l

Specifies a base file name into which

-l logfilename

operational data from the running
client will be logged.

-L

Lists services available on a server.

-L host

-I

IP address is the address of the server to

-I 10.0.0.250

connect to. Often used with L.

114881-6 ch07.F 11/12/01 8:30 AM Page 234

235

Chapter 7 ✦Configuring Networking

Switch

Description

Example

-E

Causes the client to write messages to

-E

the standard error stream (stderr) rather
than to the standard output stream.

-c

A command string separated by

-c command string such as

semicolons to be executed instead of

-c print -

prompting from stdin. -N is implied by -c.

-i

This specifies a NetBIOS scope that

-i scope

SMB/CIFS client will use to communicate
when generating NetBIOS names.

-O

TCP socket options to set on the client

-O socket options

socket. The SMB/CIFS.conf MAN page
lists the valid options.

-p

This number is the TCP port number that

-p port

will be used when making connections to
the server instead of the standard TCP port.

-R

Name resolution order with the options

-R lmhosts

of lmhosts, host, wins, and bcast.

-s

Provides the location of the

-s SMB/CIFS .conf

SMB/CIFS.conf file.

-T

The SMB/CIFS client may be used to

//server/share “”

create tar compatible backups of all the

-N -Tc backup.tar *

files on an SMB/CIFS /CIFS share.

Know the switches but also the format for all commands used in Linux.

These switches from Table 7-3 are used to create the connection. After the connec-
tion is complete, the user is presented with a new prompt that looks like this:

SMB/CIFS :\>

This prompt indicates that the client is ready and waiting to carry out a user com-
mand. The user commands are shown in Table 7-3.

114881-6 ch07.F 11/12/01 8:30 AM Page 235

236Part III ✦Configuration

Table 7-3

SMB/CIFS Client Commands

Command

Description

Example

?

Used to provide information about

? [command]

a command.

!

The ! command will execute a shell

! [shell command]

locally and run the specified shell
command.

cd

Used to change directories, or if no

cd [directory name]

directory is requested, it will list the
current directory.

del

The client will request that the server

del

attempt to delete all files matching
mask in the current directory.

dir

A list of the files matching mask in

dir

the current directory will be retrieved
and displayed.

exit

Exit the program SMB/CIFS client; this

exit

will terminate all connections.

get

Get a remote file and copy it

get

to the local file [name]. This is a binary

[local file name]

transfer.

help

Used to provide information about a

help [command]

command.

lcd

The current working directory on the

lcd [directory name]

local machine will be changed to the
directory specified.

lowercase

When lowercasing is toggled ON, local

lowercase

filenames are converted to lowercase
when using the get and mget commands.

ls

A list of the files matching mask in

ls

the current directory will be retrieved
and displayed.

mask

This command allows the user to set up

mask

a mask, which will be used during
recursive operation of the mget and
mput commands.

md

Used to create a new directory with

md

a specified name.

114881-6 ch07.F 11/12/01 8:30 AM Page 236

237

Chapter 7 ✦Configuring Networking

Command

Description

Example

mget

Copy all files matching mask from the

mget

server to the machine running the client.

mkdir

Used to create a new directory with a

mkdir

specified name.

mput

Copy all files matching mask from the

mput

machine running the client to the server.

print

Print the specified file from the client

print

through a printable service on the server.

printmode

Set the print mode to suit either binary

printmode

data or text.

or text>

prompt

Toggle prompting for filenames during

prompt

operation of the mget and mput
commands.

put

Copy the file called local file name

put

from the client to the server with

[remote file name]

optional remote file name.

queue

Displays the print queue, showing the

queue

job ID, name, size, and current status.

quit

Exit the program SMB/CIFS client; this

quit

will terminate all connections.

rd

Remove the specified directory.

rd

recurse

Toggle directory recursion for the

recurse

commands mget and mput.

rm

Remove all files in the current directory

rm

with the match the .

rmdir

Remove the specified directory.

rmdir

tar

Perform the tar operation.

tar [IXbgNa]

blocksize

Must be followed by a valid

blocksize

(greater than zero) blocksize.
Causes tar file to be written out
in blocksize*TBLOCK (usually 512
byte) blocks.

tarmode

Changes tars behavior with regard

tarmode

to archive bits.

setmode

A version of the DOS attrib command

setmode

to set file permissions.

114881-6 ch07.F 11/12/01 8:30 AM Page 237

238Part III ✦Configuration

You're Reading a Free Preview

Descarregar
scribd
/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->