LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 08-30-2004, 05:03 AM   #1
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Rep: Reputation: 30
smbclient


Hi,

How do I list out what share folders does a machine have?

Code:
root@host root]# smbclient -L 192.168.0.162
Password:
session setup failed: NT_STATUS_ACCOUNT_LOCKED_OUT
[root@host root]# smbclient -L 192.168.0.162
Password:
Anonymous login successful
Domain=[COLLIN_DOMAIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Sharename       Type      Comment
        ---------       ----      -------
Error returning browse list: NT_STATUS_ACCESS_DENIED
session request to 192.168.0.162 failed (Called name not present)
session request to 192 failed (Called name not present)
Anonymous login successful
Domain=[COLLIN_DOMAIN] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

        Server               Comment
        ---------            -------

        Workgroup            Master
        ---------            -------
[root@host root]#
Tried entering the password of my windows account but it said account locked out. Tried anonymous, access denied?
 
Old 08-30-2004, 10:47 AM   #2
Gkarfield
Member
 
Registered: Jul 2004
Location: Greece
Distribution: FreeBSD 6.2/widows[not 8 legs nor black]
Posts: 123

Rep: Reputation: 15
try smbmount

smbmount //[share] <folder. -o ip=xxx.xxx.xxx.xxx
(tyhat is , if you know the share.

for win98 its ok the :smbclient -L <hostname>
(or address)

but I get errors too for win2k
 
Old 08-30-2004, 12:02 PM   #3
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Gkarfield
try smbmount

smbmount //[share] <folder. -o ip=xxx.xxx.xxx.xxx
(tyhat is , if you know the share.

for win98 its ok the :smbclient -L <hostname>
(or address)

but I get errors too for win2k
What if I don't know the share folder, I just wanna list what share folder that pc have.
 
Old 08-31-2004, 11:33 AM   #4
Gkarfield
Member
 
Registered: Jul 2004
Location: Greece
Distribution: FreeBSD 6.2/widows[not 8 legs nor black]
Posts: 123

Rep: Reputation: 15
sorry 4 the delay. cant u go to the windows machine to have a look at the shares?
 
Old 08-31-2004, 12:07 PM   #5
Mathieu
Senior Member
 
Registered: Feb 2001
Location: Montreal, Quebec, Canada
Distribution: RedHat, Fedora, CentOS, SUSE
Posts: 1,403

Rep: Reputation: 46
You forgot to specify a username with the -U option.
By default, if no username is provided, smbclient will use your linux username (in your case, root).

Code:
smbclient -L computer_name -U username
 
Old 09-01-2004, 11:25 PM   #6
subaruwrx
Member
 
Registered: Mar 2004
Distribution: Ubuntu Feisty
Posts: 641

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by Mathieu
You forgot to specify a username with the -U option.
By default, if no username is provided, smbclient will use your linux username (in your case, root).

Code:
smbclient -L computer_name -U username
It seems that I can't use root for smbclient or mounting of smbfs. I need to use another user account.

Why is it so?
 
Old 09-02-2004, 03:31 AM   #7
Gkarfield
Member
 
Registered: Jul 2004
Location: Greece
Distribution: FreeBSD 6.2/widows[not 8 legs nor black]
Posts: 123

Rep: Reputation: 15
smbclient is like ftp, so you log onto the machine as the user of that machine. or a user that is declared on that machine.

smbmount on the other hand, is a mount of the shared folder to a local folder. the root does it, so he takes the ownership, but if you use uid=<username>, the ownership goes to user (the root has always access)
 
Old 09-02-2004, 09:43 AM   #8
villie
Member
 
Registered: Apr 2004
Location: Pakistan
Distribution: RedHat
Posts: 46

Rep: Reputation: 15
Try using smbtree. It will give you all the shared folders on the network.

Regards
Villie
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
no smbclient wildbob Fedora 2 04-24-2005 01:49 PM
smbclient help m0nk3yb0y Linux - Networking 5 03-15-2005 01:12 AM
How to use SMBclient? cathodion Linux - Networking 4 12-22-2004 04:48 AM
smbclient problems adamkimber Linux - Networking 3 11-16-2003 11:03 AM
smbclient not working DonMiner Linux - Networking 2 09-04-2003 09:04 PM


All times are GMT -5. The time now is 05:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration