xref: /freebsd/contrib/smbfs/smbutil/smbutil.1 (revision dd41de95a84d979615a2ef11df6850622bf6184e)
1.\" $Id: smbutil.1,v 1.5 2002/04/16 02:48:16 bp Exp $
2.Dd November 14, 2018
3.Dt SMBUTIL 1
4.Os
5.Sh NAME
6.Nm smbutil
7.Nd "interface to the SMB requester"
8.Sh SYNOPSIS
9.Nm
10.Op Fl hv
11.Ar command
12.Op Ar options
13.Op Ar args
14.Sh DESCRIPTION
15The
16.Nm
17command is used to control SMB requester and issue various commands.
18.Pp
19There are two types of options \(em global and local to the specified
20.Ar command .
21.Pp
22Global options are as follows:
23.Bl -tag -width indent
24.It Fl h
25Print a short help message.
26.It Fl v
27Verbose output.
28.El
29.Pp
30The commands and local options are:
31.Bl -tag -width indent
32.It Cm crypt Op Ar password
33Encrypt clear text password for use in the
34.Pa ~/.nsmbrc
35file.
36The encrypted password starts with the
37.Ql $$1
38symbols.
39Warning: the encryption function is very weak and intended only to hide
40clear text password.
41If
42.Ar password
43is omitted from the command line,
44.Nm
45will prompt for one.
46.It Cm help Ar command
47Print usage information about
48.Ar command .
49.It Cm lc
50List active connections and their parameters.
51.It Xo
52.Cm login
53.Op Ar connection_options
54.Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Op Cm \&/ Ns Ar share
55.Xc
56Login/attach to the specified
57.Ar server
58and/or
59.Ar share
60as
61.Ar user .
62This command will create and authenticate connection to an SMB server, and
63will leave it active after exit.
64Thus, it is possible to login only once and then
65use other SMB commands without authentication procedure and additional
66connections.
67For the description of
68.Ar connection_options
69refer to the
70.Xr mount_smbfs 8
71manual page (all uppercase options are connection options).
72.It Xo
73.Cm logout
74.Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Op Cm \&/ Ns Ar share
75.Xc
76Logout/detach from the specified
77.Ar server
78and/or
79.Ar share
80as
81.Ar user .
82This command will destroy a connection created by the
83.Cm login
84command.
85A connection may not be closed immediately if it is used by other
86programs.
87.It Xo
88.Cm lookup
89.Op Fl w Ar host
90.Ar name
91.Xc
92Resolve the given
93.Ar name
94to an IP address.
95The NetBIOS name server can be directly specified via the
96.Fl w
97option.
98.It Xo
99.Cm print
100.Op Ar connection_options
101.Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server Ns Op Cm \&/ Ns Ar share
102.Ar file
103.Xc
104Send the given
105.Ar file
106to the specified queue on the remote server.
107If
108.Ar file
109is
110.Dq Pa - ,
111then standard input will be used.
112.It Xo
113.Cm view
114.Op Ar connection_options
115.Cm \&// Ns Ar user Ns Cm \&@ Ns Ar server
116.Xc
117List resources available on the specified
118.Ar server
119for the user
120.Ar user .
121.El
122.Sh FILES
123.Bl -tag -width ".Pa ~/.nsmbrc" -compact
124.It Pa ~/.nsmbrc
125Keeps description for each connection.
126See
127.Pa /usr/share/examples/smbfs/dot.nsmbrc
128for details.
129.El
130.Sh SEE ALSO
131.Xr nsmb.conf 5 ,
132.Xr mount_smbfs 8
133.Sh AUTHORS
134.An Boris Popov Aq bp@butya.kz ,
135.Aq bp@FreeBSD.org
136.Sh BUGS
137Please report any bugs to the author.
138