Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
How could I ensure myself that any of my disks is not share to others on network? I use shares on other machines using samba and wondering if others might ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2004
    Posts
    50

    check shares on my machine


    How could I ensure myself that any of my disks is not share to others on network?
    I use shares on other machines using samba and wondering if others might get access to my files without my knowledge. Sorry for so basic question.

  2. #2
    Just Joined! srerucha's Avatar
    Join Date
    Jun 2005
    Location
    Brno, Czech republic
    Posts
    58

    Re: check shares on my machine

    Quote Originally Posted by pksa
    How could I ensure myself that any of my disks is not share to others on network?
    I use shares on other machines using samba and wondering if others might get access to my files without my knowledge. Sorry for so basic question.
    Run

    smbclient -L 127.0.0.1 -U yourusername

    on your box to see what shares are available to user yourusername, or simply

    smbclient -L 127.0.0.1

    to see shares avalable for guests.

  3. #3
    Just Joined!
    Join Date
    Sep 2004
    Posts
    50

    Re: check shares on my machine

    Hm
    Look:
    Code:
    linux:/home/pksa # hostname -i
    10.0.0.119 [quote]
    [/quote]linux:/home/pksa # smbclient -L 10.0.0.119
    Error connecting to 10.0.0.119 (No route to host)
    Connection to 10.0.0.119 failed
    Does that mean that there no shares on my mashines or I'm doing that wrong.

  4. $spacer_open
    $spacer_close
  5. #4
    Just Joined! srerucha's Avatar
    Join Date
    Jun 2005
    Location
    Brno, Czech republic
    Posts
    58
    Does that mean that there no shares on my mashines or I'm doing that wrong.
    No, it doesn't ...This means that your box is unable to connect to itself .. try smbclient with loopback address 127.0.0.1 ...

    linux:/home/pksa # hostname -i
    10.0.0.119
    linux:/home/pksa # smbclient -L 10.0.0.119
    Error connecting to 10.0.0.119 (No route to host)
    Connection to 10.0.0.119 failed
    Hmm, it lookx bit strange ... do you have some firewall set-up ? Or don't you have inproperly set network mask or routing ? Try to run smblient -L 10.0.0.119 from another machine on your network, what does it say ?

  6. #5
    Just Joined!
    Join Date
    Sep 2004
    Posts
    50
    I have firewall set on.
    I tried smbclient -L 127.0.0.1 but it gives the same message.
    There might be something with network mask or routing. I guess that during system boot the ip is set to 10.0.0.111.
    How could I check it?

  7. #6
    Just Joined! srerucha's Avatar
    Join Date
    Jun 2005
    Location
    Brno, Czech republic
    Posts
    58
    Try to shut down the fw temprarily and check the smbclient ...

    The command
    Code:
    ip addr show
    or
    Code:
    ifconfig
    will show you your IP

  8. #7
    Just Joined!
    Join Date
    Sep 2004
    Posts
    50
    Wright:
    linux:/home/pksa # ip addr show
    Code:
    1&#58; lo&#58; <LOOPBACK,UP> mtu 16436 qdisc noqueue 
        link/loopback 00&#58;00&#58;00&#58;00&#58;00&#58;00 brd 00&#58;00&#58;00&#58;00&#58;00&#58;00
        inet 127.0.0.1/8 brd 127.255.255.255 scope host lo
        inet6 &#58;&#58;1/128 scope host 
           valid_lft forever preferred_lft forever
    2&#58; sit0&#58; <NOARP> mtu 1480 qdisc noqueue 
        link/sit 0.0.0.0 brd 0.0.0.0
    3&#58; eth0&#58; <BROADCAST,MULTICAST,NOTRAILERS,UP> mtu 1500 qdisc pfifo_fast qlen 1000
        link/ether 00&#58;c0&#58;f0&#58;3c&#58;5b&#58;18 brd ff&#58;ff&#58;ff&#58;ff&#58;ff&#58;ff
        inet 10.0.0.111/24 brd 10.0.0.255 scope global eth0
        inet6 fe80&#58;&#58;2c0&#58;f0ff&#58;fe3c&#58;5b18/64 scope link 
           valid_lft forever preferred_lft forever
    linux:/home/pksa # ifconfig
    Code:
    eth0      Link encap&#58;Ethernet  HWaddr 00&#58;C0&#58;F0&#58;3C&#58;5B&#58;18  
              inet addr&#58;10.0.0.111  Bcast&#58;10.0.0.255  Mask&#58;255.255.255.0
              inet6 addr&#58; fe80&#58;&#58;2c0&#58;f0ff&#58;fe3c&#58;5b18/64 Scope&#58;Link
              UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU&#58;1500  Metric&#58;1
              RX packets&#58;603 errors&#58;1 dropped&#58;0 overruns&#58;0 frame&#58;0
              TX packets&#58;493 errors&#58;4 dropped&#58;0 overruns&#58;0 carrier&#58;4
              collisions&#58;0 txqueuelen&#58;1000 
              RX bytes&#58;208580 &#40;203.6 Kb&#41;  TX bytes&#58;94836 &#40;92.6 Kb&#41;
              Interrupt&#58;11 Base address&#58;0xe800
    But
    linux:/home/pksa # hostname -i
    Code:
    10.0.0.119

    And finaly:
    linux:/home/pksa # smbclient -L 10.0.0.111

    [/quote]Error connecting to 10.0.0.111 (Connection refused)
    Connection to 10.0.0.111 failed

  9. #8
    Just Joined! srerucha's Avatar
    Join Date
    Jun 2005
    Location
    Brno, Czech republic
    Posts
    58
    Well done,
    after all it seems you don't have samba (smbd) running and nobody from local network cannot acces your files using it ...

  10. #9
    Just Joined!
    Join Date
    Sep 2004
    Posts
    50
    First of all thank you v.much for help.

    I need to read sth about smb client. I don't have it installed but I can mount other shares (mount -smbfs). Does that mean that to share disk smb client should be installed but to mount them there is no such need?

    What about the other ip which is reported by hostname -i. Is there something wrong?

  11. #10
    Just Joined! srerucha's Avatar
    Join Date
    Jun 2005
    Location
    Brno, Czech republic
    Posts
    58
    Quote Originally Posted by pksa
    I need to read sth about smb client. I don't have it installed but I can mount other shares (mount -smbfs). Does that mean that to share disk smb client should be installed but to mount them there is no such need?
    Not exactly. To share your files you nedd smbd (smba daemon, from package samba). To acces files ahred by others you need smblient (samba client, package samba-clent). This clients allows you to mount the shares from others machines.

    What about the other ip which is reported by hostname -i. Is there something wrong?
    I'm not sure about this ... maybe some misconfiguration ... but the ip (of ifconfig) are reliable sources

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •