smbutil vs smbclient

I tried using the smbclient command on my macbook pro


smbclient -U <username> //server/path


as I've done on my linux workstation to access a remote server, and I found that rather than smbclient, smbutil is installed on my mac.


I can't quite figure out the equivalent syntax in smbutil, i.e. there is no -U argument for users etc so substitution smbutil for smbclient in the above doesn't work. Could somebody please direct me to the correct syntax (I've found lengthy smbutil users guides online, but I can't find this simple command, which really is all that I need at this point).


Thank you in advance.

MacBook Pro 16″, macOS 11.7

Posted on Mar 7, 2023 11:44 AM

Reply
Question marked as Top-ranking reply

Posted on Mar 7, 2023 3:48 PM

smbclient is an SMB client tool for the command line, and is part of the Samba package. It can poke at an SMB server, and can also transfer files around akin to FTP.


smbutil is a macOS tool used to manage the SMB server, and view its shares and such. It doesn't include file-transfer capabilities.


I don't know off-hand if macOS even has a command-line SMB client—mount via mount_smbfs or mount -t smbfs or such, yes, but not a direct FTP-analog for SMB akin to smbclient. Well, there's curl, and curl can do pretty much anything, including with SMB.


From the curl docs:

curl -u "domain\username:passwd" smb://server.example.com/share/file.txt


Homebrew has Samba available and I'd expect that includes the smbclient tool, if you prefer to load and use that.


PS: You've written a fair amount of text for your question, but haven't told us what you actually want to do, except in terms of the provided Samba command. A command which AFAICT doesn't do anything. Put differently, I'm not entirely certain what you're trying to do here with SMB, as the the smbclient -U command shown doesn't make sense to me; missing a switch or three?

1 reply
Question marked as Top-ranking reply

Mar 7, 2023 3:48 PM in response to Cyprinus1988

smbclient is an SMB client tool for the command line, and is part of the Samba package. It can poke at an SMB server, and can also transfer files around akin to FTP.


smbutil is a macOS tool used to manage the SMB server, and view its shares and such. It doesn't include file-transfer capabilities.


I don't know off-hand if macOS even has a command-line SMB client—mount via mount_smbfs or mount -t smbfs or such, yes, but not a direct FTP-analog for SMB akin to smbclient. Well, there's curl, and curl can do pretty much anything, including with SMB.


From the curl docs:

curl -u "domain\username:passwd" smb://server.example.com/share/file.txt


Homebrew has Samba available and I'd expect that includes the smbclient tool, if you prefer to load and use that.


PS: You've written a fair amount of text for your question, but haven't told us what you actually want to do, except in terms of the provided Samba command. A command which AFAICT doesn't do anything. Put differently, I'm not entirely certain what you're trying to do here with SMB, as the the smbclient -U command shown doesn't make sense to me; missing a switch or three?

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

smbutil vs smbclient

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.