Ubuntu Unleashed 2019 Edition: Covering 18.04, 18.10, 19.04

(singke) #1

server with all the defaults. The most common option you will change in this
command is the location of the smb.conf file; you change this option if you
don’t want to use the default location /etc/smb/smb.conf. The -s
option enables you to change the smb.conf file Samba uses; this option is
also useful for testing whether a new smb.conf file actually works. Another
useful option is the -l option, which specifies the log file Samba uses to store
information.


To start, stop, or restart Samba from the command line, use the following,
replacing start with either stop or restart as appropriate:


Click here to view code image
matthew@seymour:~$ sudo start smbd


Using the smbstatus Command

The smbstatus command reports on the current status of your Samba
connections. The syntax is as follows:


Click here to view code image
/usr/bin/smbstatus [options]


Table 23.2 shows some of the available options.


Table 23.2 smbstatus Options


Option Result

-b Brief    output

-d Verbose  output

-s
/path/to/config

Used    if  the configuration   file    used    at  startup is  not the
standard one

-u  username Shows  the status  of  a   specific    user’s  connection

-p Lists    current smb processes,  which   can be  useful  in
scripts

Connecting with the smbclient Command

The smbclient command allows users on other Linux hosts to access your

Free download pdf