Network: Samba: FreeBSD programs

(last edit: 2001-03-18) There are allot of samba programs on FreeBSD. I will explain the following in this section:
  • smbstatus
  • smbtar
  • nmblookup
  • smbpasswd
  • testparm
  • smbd
  • nmbd
  • smbclient
smbstatus List the current connections on a Samba server. example: ------ /usr/local>smbstatus <snip> Samba version 2.0.6 Service uid gid pid machine ---------------------------------------------- data pblaptop smbusers 509 packardhell ( Tue Aug 29 22:01:06 2000 No locked files Share mode memory usage (bytes): 1048464(99%) free + 56(0%) used + 56(0%) overhead = 1048576(100%) total ------ smbtar This is a shell script on top of smbclient that gives the programm more intelligble options when doing tar operations. -s server Specifies the SMB/CIFS server in which the share resides. -x share States the share name on the server to connect to. -u user Specifies the user to connect to the share as. -p password Specifies the password to use to access a share. -t tape Tape device or file. example: smbtar -s pc_name -x sue -u sue -p secret -t sue.tar nmblookup Exercises the NEtBIOS-over-UDP/IP name service for resolving NBT names into IP addresses. -M Searches for a local master browser. -S Once the name query has returned an IP address, does a node status query as well. example: ------ /usr>nmblookup -S biggie <snip> Looking up status of received 7 names BIGGIE <00> - B <ACTIVE> BIGGIE <03> - B <ACTIVE> BIGGIE <20> - B <ACTIVE> ..__MSBROWSE__. <01> - <GROUP> B <ACTIVE> TOYS <00> - <GROUP> B <ACTIVE> TOYS <1d> - B <ACTIVE> TOYS <1e> - <GROUP> B <ACTIVE> num_good_sends=0 num_good_receives=0 ------ smbpasswd When run by users, it changes their encrypted passwords. When run by root, it updates the encrypted password file. Regular user options -r remote_machine_name On which machine should the password change. Root-only options -a username Adds a user to the password file -d username Disables a user. -e username Enables a user. testparm Checks an smb.conf file for obvious errors. -L server_name Resets the %L configuration variable to the specified server name. smbd man smbd Smbd is the server daemon that provides filesharing and printing services to Windows clients. The server provides filespace and printer services to clients using the SMB (or CIFS) protocol. -D If specified, this parameter causes the server to operate as a daemon. That is, it detaches itself and runs in the background, fielding requests on the appropriate port. Operating the server as a daemon is the recommended way of running smbd for servers that provide more than casual use file and print services. By default, the server will NOT operate as a daemon. nmbd man nmbd Nmbd is a server that understands and can reply to NetBIOS over IP name service requests,like those produced by SMBD/CIFS clients such as Windows 95/98, Windows NT and LanManager clients. It also participates in the browsing protocols which make up the Windows "Network Neighborhood" view. -D If specified, this parameter causes nmbd to operate as a daemon. That is, it detaches itself and runs in the background, fielding requests on the appropriate port. By default, nmbd will NOT operate as a daemon. nmbd can also be operated from the inetd meta-daemon, although this is not recommended. smbclient With this tool you can access your windows shares from FreeBSD. It works like a ftp client so you have to put and get the files. examples: />smbclient -L packardhell <snip> Connecting to at port 139 Password: Sharename Type Comment --------- ---- ------- DATA Disk HARDESCHIJF Disk IPC$ IPC Remote Inter Process Communication Server Comment --------- ------- Workgroup Master --------- ------- /usr/local/etc/>smbclient \\\\packardhell\\data <snip> Connecting to at port 139 Password: smb: \>help 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: \> help get HELP get: <remote name> [local name] get a file smb: \> help mget HELP mget: <mask> get all the matching files smb: \> help put HELP put: <local name> [remote name] put a file smb: \> help mput HELP mput: <mask> put all matching files

Click here to go back to the index.