WSPSEARCH(1)
๐ WSPSEARCH(1) โ the girlies' guide to hunting stuff down on a Windows Search server
okay so bestie, welcome to wspsearch(1) ๐ธ this is a User Commands manpage and it's giving "niche but iconic". grab a strawberry drink ๐ and let's get into it.
โจ NAME โจ
wspsearch โ run Windows Search Protocol searches against a SMB server ๐โจ
๐ฆ SYNOPSIS ๐ฆ
wspsearch {//server/share} [--limit=results] [--search=phrase]
[--kind=KIND] [--query=QUERY] [-?|--help] [--usage]
[-d|--debuglevel=DEBUGLEVEL] [--debug-stdout]
[-s|--configfile=CONFIGFILE] [--option=name=value]
[-l|--log-basename=LOGFILEBASE] [--leak-report] [--leak-report-full]
[-R|--name-resolve=NAME-RESOLVE-ORDER]
[-O|--socket-options=SOCKETOPTIONS] [-m|--max-protocol=MAXPROTOCOL]
[-n|--netbiosname=NETBIOSNAME] [--netbios-scope=SCOPE]
[-W|--workgroup=WORKGROUP] [--realm=REALM]
[-U|--user=[DOMAIN/]USERNAME[%PASSWORD]] [-N|--no-pass]
[--password=STRING] [--pw-nt-hash] [-A|--authentication-file=FILE]
[-P|--machine-pass] [--simple-bind-dn=DN]
[--use-kerberos=desired|required|off] [--use-krb5-ccache=CCACHE]
[--use-winbind-ccache] [--client-protection=sign|encrypt|off]
no cap, that's a whole lot of flags and every single one of them is getting its moment below ๐
๐ DESCRIPTION ๐
This tool is part of the samba(1) suite. family reunion vibes ๐ซถ
wspsearch is a simple utility to run Windows Search Protocol searches against a SMB server that has the WSP service enabled. literally that's the whole job. it searches, it slays, it goes home. ๐
๐ OPTIONS ๐
serverโ the SMB server name or IP address you're connecting to. that's the whole address, don't be shy about it ๐sharenameโ the name of a share on the server. your little corner of the filesystem ๐--queryโ a query specified in simplified AQS-like (Advanced query syntax). bestie this one's got lore, so buckle up:- Basic (AQS) syntax is supported (peep SEE ALSO for the receipts).
- A query consists of a sequence of queries connected by
AND,ORandNOTboolean operators. iconic trio, honestly. - The query elements are essentially restrictions defined by a property.
- There are some limitations on the operators supported, and some types of properties like enumerated ranges are not supported at all. ๐
- Additionally, syntactically range values are not delimited as specified by AQS โ ranges are instead specified as
value-value. not me having to say that twice. - Some special cases that you see in the windows search UI (for example sizes like
'tiny','small','large'etc.) are exceptions which are handled more or less as keywords. - See EXAMPLES below ๐
--search=phraseโ a simple phrase that is searched across the index. just say the thing, she'll find it ๐ฌ--kind=KINDโ kind is one of these, and yes the whole list is coming because we don't skip:- Calendar
- Communication
- Contact
- Document
- Feed
- Folder
- Game
- InstantMessage
- Journal
- Movie
- Music
- Link
- Note
- Picture
- Program
- RecordedTV
- SearchFolder
- Task
- Video
- WebHistory
21 kinds, all main character energy ๐
--limitโ a limit on the number of results returned. by default there is a limit of 500 results. a limit of 0 indicates no limit and all results will be returned. so like,0is the "I have no chill and I want everything" setting ๐-?,--helpโ print a summary of command line options. your lil cheat sheet ๐ซถ--usageโ display brief usage message. the short version, for when you're in a hurry ๐โโ๏ธ-d,--debuglevel=levelโ level is an integer from0to10. the default value if this parameter is not specified is1for client applications.- The higher this value, the more detail will be logged to the log files about the activities of the server. at level
0, only critical errors and serious warnings will be logged. level1is a reasonable level for day-to-day running โ it generates a small amount of information about operations carried out. cute, lowkey, manageable โจ - Levels above
1will generate considerable amounts of log data, and should only be used when investigating a problem. - Levels above
3are designed for use only by developers and generate HUGE amounts of log data, most of which is extremely cryptic. and yes "HUGE" is in all caps in the original, that's not me being dramatic for once ๐ญ - Note that specifying this parameter here will override the log level parameter in the
/etc/samba/smb.conffile.
- The higher this value, the more detail will be logged to the log files about the activities of the server. at level
--debug-stdoutโ this will redirect debug output toSTDOUT. by default all clients are logging toSTDERR. she's moving out of the group chat and into the main feed ๐ค--configfile=<configuration file>โ the file specified contains the configuration details required by the client. the information in this file can be general for client and server or only provide client specific like options such as client smb encrypt. see/etc/samba/smb.conffor more information. the default configuration file name is determined at compile time. mysterious. love that for her ๐ญ--option=<name>=<value>โ set thesmb.conf(5)option"<name>"to value"<value>"from the command line. this overrides compiled-in defaults and options read from the configuration file. if a name or a value includes a space, wrap whole--option=name=valueinto quotes. space in the name? quote the whole thing, babes ๐ง-l,--log-basename=logdirectoryโ base directory name for log/debug files. the extension".progname"will be appended (e.g.log.smbclient,log.smbd, etc...). the log file is never removed by the client. it stays. forever. she lives there now ๐ก--leak-reportโ enable talloc leak reporting on exit. ๐ฐ--leak-report-fullโ enable full talloc leak reporting on exit. the deluxe edition, the director's cut ๐-V,--versionโ prints the program version number. hi, what's your sign? โ-U,--user=[DOMAIN\]USERNAME[%PASSWORD]โ sets the SMB username or username and password. the details:- If
%PASSWORDis not specified, the user will be prompted. the client will first check theUSERenvironment variable (which is also permitted to also contain the password separated by a%), then theLOGNAMEvariable (which is not permitted to contain a password) and if either exists, the value is used. If these environmental variables are not found, the username found in a Kerberos Credentials cache may be used. - A third option is to use a credentials file which contains the plaintext of the username and password. this option is mainly provided for scripts where the admin does not wish to pass the credentials on the command line or via environment variables. If this method is used, make certain that the permissions on the file restrict access from unwanted users. see the
-Afor more details. - Be cautious about including passwords in scripts or passing user-supplied values onto the command line. for security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
kinit. - While Samba will attempt to scrub the password from the process title (as seen in
ps), this is after startup and so is subject to a race. ๐ not the fun kind of race.
- If
-N,--no-passโ if specified, this parameter suppresses the normal password prompt from the client to the user. this is useful when accessing a service that does not require a password.- Unless a password is specified on the command line or this parameter is specified, the client will request a password.
- If a password is specified on the command line and this option is also defined, the password on the command line will be silently ignored and no password will be used. she's not listening to you anymore, bestie ๐
--passwordโ specify the password on the commandline.- Be cautious about including passwords in scripts or passing user-supplied values onto the command line. for security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
kinit. - If
--passwordis not specified, the tool will check thePASSWDenvironment variable, followed byPASSWD_FDwhich is expected to contain an open file descriptor (FD) number. - Finally it will check
PASSWD_FILE(containing a file path to be opened). the file should only contain the password. make certain that the permissions on the file restrict access from unwanted users! - While Samba will attempt to scrub the password from the process title (as seen in
ps), this is after startup and so is subject to a race.
- Be cautious about including passwords in scripts or passing user-supplied values onto the command line. for security it is better to let the Samba client tool ask for the password if needed, or obtain the password once with
--pw-nt-hashโ the supplied password is the NT hash. ๐งฎ-A,--authentication-file=filenameโ this option allows you to specify a file from which to read the username and password used in the connection. the format of the file is:
username = <value>
password = <value>
domain = <value>
Make certain that the permissions on the file restrict access from unwanted users! ๐
-P,--machine-passโ use stored machine account password. she already knows her own password, she's built different ๐--simple-bind-dn=DNโ DN to use for a simple bind. ๐ชข--use-kerberos=desired|required|offโ this parameter determines whether Samba client tools will try to authenticate using Kerberos.- For Kerberos authentication you should use DNS names instead of IP addresses when connecting to a service. (yes this is a real rule, no cap.)
- By default Samba client tools will try to use the default Kerberos credential cache (ccache).
- In case the ccache does not exist or
-U|--useroption was specified, clients will ask to enter a password and will obtain a Kerberos ticket (kinit) for you. - If you want to use an alternative Kerberos credentical cache, use the
--use-krb5-ccacheoption. - Note that specifying this parameter here will override the client use kerberos parameter in the
/etc/samba/smb.conffile.
--use-krb5-ccache=CCACHEโ specifies the credential cache location for Kerberos authentication. this will enforce--use-kerberos=required. no takebacks โ--use-winbind-ccacheโ try to use the credential cache by winbind. ๐ค--client-protection=sign|encrypt|offโ sets the connection protection the client tool should use.- Note that specifying this parameter here will override the client protection parameter in the
/etc/samba/smb.conffile. - In case you need more fine grained control you can use:
--option=clientsmbencrypt=OPTION,--option=clientipcsigning=OPTION,--option=clientsigning=OPTION. granular. obsessed. ๐ฌ
- Note that specifying this parameter here will override the client protection parameter in the
๐ EXAMPLES ๐
Search using a basic phrase:
'wspsearch -Usomeuser%password //server/share --phrase="cats"'
Search using an AQS like query for a picture whose name starts with p403 or p404:
'wspsearch -Usomeuser%password //server/share --query="ALL:$<p403 OR ALL:$<p404 AND System.Kind:picture"'
copy them exactly, character for character, don't improvise ๐ซถ
๐ฅ SEE ALSO ๐ฅ
Adanced Query Syntax https://learn.microsoft.com/en-gb/windows/win32/search/-search-3x-advancedquerysyntax
(yes, "Adanced" โ that's exactly how it's written in the original, and honestly? she's an icon for it ๐ )
โญ VERSION โญ
This man page is part of version 4.23.8 of the Samba suite. ๐ท๏ธ
๐ AUTHOR ๐
The original Samba software and related utilities were created by Andrew Tridgell. Samba is now developed by the Samba Team as an Open Source project similar to the way the Linux kernel is developed. the blueprint, the blueprint ๐ซถ
The wspsearch manpage was written by Noel Power. thank you for your service, king ๐ธ
okay that's the whole page, you made it to the end, so proud of you fr fr ๐ this was Samba 4.23.8, dated 05/28/2026 โ write it in your notes, put it on your mirror, tattoo it idk. mwah! ๐โจ๐ฆ๐
๐ฆ where this page comes from
- alpine 3.24: samba-doc 4.23.8-r0 ยท GPL-3.0-or-later AND LGPL-3.0-or-later
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms