# Linux 0wns....too much (Samba problems) :)

## Red Nalie

Alright, I'll keep it nice and short this time  :Wink: 

When I want to connect to a Windows machine (....don't ask....) my Samba tries to 0wn all files/directories on that thing....

As in: "smb://192.168.0.*" it asks me to issue username & password for every darn file....and the bitch who's next to me has a lot of em....   :Shocked: 

So I assume that there should be a easier way, instead of hitting enter 20,000 times...

Any advice here?

The bitch can logon to my Linux from Windows like a baby....but not the otherway around...

Help me fixx0r this  :Smile: 

----------

## puggy

I'm not sure whats happening here... are you just browsing the files not mouting the share with something like

```
smbmount //192.168.0.2/media /mnt/smbmedia
```

?

Puggy

----------

## Red Nalie

 *puggy wrote:*   

> I'm not sure whats happening here... are you just browsing the files not mouting the share with something like
> 
> ```
> smbmount //192.168.0.2/media /mnt/smbmedia
> ```
> ...

 

browsing  :Smile: 

----------

## Red Nalie

 *Red Nalie wrote:*   

>  *puggy wrote:*   I'm not sure whats happening here... are you just browsing the files not mouting the share with something like
> 
> ```
> smbmount //192.168.0.2/media /mnt/smbmedia
> ```
> ...

 

[edit]

My beautiful error from Samba when I try to mount him:

```

smbmount //192.168.0.111/ /mnt/elmer/

8993: session request to 192.168.0.111 failed (Called name not present)

8993: session request to 192 failed (Called name not present)

Password:

8993: tree connect failed: ERRDOS - ERRnosuchshare (You specified an invalid share name)

```

aint it Samba-achtig  :Wink: 

----------

## easykill

if i recall, you can't mount the root of the windows computer

you can do smbclient -L //whateverthatIPwas

to get the share names

then

smbmount //whatever/sharename /mnt/elmer and that should work.

That is the best way I have found to use samba.

----------

## Red Nalie

 *easykill wrote:*   

> if i recall, you can't mount the root of the windows computer
> 
> you can do smbclient -L //whateverthatIPwas
> 
> to get the share names
> ...

 

Ok, this works like a charm, but I'd really like to browse through his computer   :Mad: 

----------

## puggy

try nautilas.

Puggy

----------

## Red Nalie

 *puggy wrote:*   

> try nautilas.
> 
> Puggy

 

```

emerge nautilus -p

These are the packages that I would merge, in order:

Calculating dependencies ...done!

[ebuild  N   ] x11-themes/gnome-icon-theme-1.0.2

[ebuild  N   ] net-libs/linc-1.0.1

[ebuild  N   ] gnome-base/ORBit2-2.6.1

[ebuild  N   ] gnome-base/gconf-2.2.0

[ebuild  N   ] gnome-base/bonobo-activation-2.2.1.1

[ebuild  N   ] gnome-base/libbonobo-2.2.1

[ebuild  N   ] app-text/docbook-xsl-stylesheets-1.57.0

[ebuild  N   ] app-text/docbook-xml-dtd-4.1.2-r3

[ebuild  N   ] dev-python/PyXML-0.8.1

[ebuild  N   ] gnome-base/libglade-2.0.1

[ebuild  N   ] gnome-base/libgnomecanvas-2.2.0.2

[ebuild  N   ] gnome-base/gnome-mime-data-2.2.0

[ebuild  N   ] gnome-base/gnome-vfs-2.2.3

[ebuild  N   ] gnome-base/libgnome-2.2.0.1

[ebuild  N   ] gnome-base/libbonoboui-2.2.0.1

[ebuild  N   ] gnome-base/libgnomeui-2.2.0.1

[ebuild  N   ] x11-themes/gtk-engines-metal-2.2.0

[ebuild  N   ] x11-themes/gtk-engines-thinice-2.0.2

[ebuild  N   ] x11-themes/gtk-engines-redmond95-2.2.0

[ebuild  N   ] x11-themes/gtk-engines-pixbuf-2.2.0

[ebuild  N   ] x11-themes/gnome-themes-2.2.1

[ebuild  N   ] x11-libs/startup-notification-0.5

[ebuild  N   ] gnome-base/gnome-desktop-2.2.1-r1

[ebuild  N   ] app-text/openjade-1.3.1-r6

[ebuild  N   ] app-text/docbook-sgml-dtd-3.0-r1

[ebuild  N   ] app-text/docbook-xml-simple-dtd-4.1.2.4

[ebuild  N   ] app-text/docbook-sgml-dtd-3.1-r1

[ebuild  N   ] app-text/docbook-sgml-dtd-4.1-r1

[ebuild  N   ] dev-perl/SGMLSpm-1.03-r4

[ebuild  N   ] app-text/docbook-dsssl-stylesheets-1.77-r1

[ebuild  N   ] app-text/docbook-sgml-dtd-4.0-r1

[ebuild  N   ] app-text/docbook-sgml-utils-0.6.11-r2

[ebuild  N   ] app-text/scrollkeeper-0.3.11-r1

[ebuild  N   ] gnome-extra/libgsf-1.6.0

[ebuild  N   ] gnome-base/librsvg-2.2.5

[ebuild  N   ] media-libs/libao-0.8.3-r1

[ebuild  N   ] media-sound/vorbis-tools-1.0-r1

[ebuild  N   ] gnome-base/gail-1.2.0

[ebuild  N   ] gnome-base/eel-2.2.2

[ebuild  N   ] gnome-base/nautilus-2.2.2

```

I think I'll pass  :Wink: 

----------

## steveb

i think you need to use a username and password to login into that computer and you need to specify a share you want to mount.

if you want quickly to scan your complete network for anonymous shares, then try:

```
for i in `nmap -sS -n 192.168.0.* -p 135,139 -T Insane | grep -i "Interesting ports on" | awk '{print $4}' | sed  "s/://"` ; do echo -ne "\n\nShares on $i:\n";smbclient -N -L //$i;done
```

i normaly mount smb shares with smbfs and with the following way:

```
mount -t smbfs //192.168.0.111/sharename /mnt/mountpoint -o rw,users,exec,\

dmask=777,fmask=777,uid=MyUnixUserUID,gid=MyUnixUserGID,\

workgroup=MyWorkGroup,username=MyWindowsUserName,password=MyWindowsPassword
```

i hope this helps you.

cheers

SteveB

----------

## steveb

nautilus in a kde environment? try lisa! it is part of kde-base/kdenetwork and you can start it with /etc/init.d/lisa start

edit the lisa settings in kde or edit it directly in the shell:

```
# cat /etc/lisarc 

SecondWait = -1

SearchUsingNmblookup = 1

DeliverUnnamedHosts = 0

FirstWait = 30

MaxPingsAtOnce = 256

UpdatePeriod = 300

PingAddresses = 192.168.0.0/255.255.255.0;

AllowedAddresses = 192.168.0.0/255.255.255.0;

BroadcastNetwork = 192.168.0.255/255.255.255.0;

PingNames = 
```

happy browsing...

cheers

SteveB

----------

## Red Nalie

 *steveb wrote:*   

> nautilus in a kde environment? try lisa! it is part of kde-base/kdenetwork and you can start it with /etc/init.d/lisa start
> 
> edit the lisa settings in kde or edit it directly in the shell:
> 
> ```
> ...

 

"lisarc" is soooooo non-existent on my PC  :Smile: 

/etc/init.d/lisa is though.....

----------

## steveb

 *Red Nalie wrote:*   

>  *steveb wrote:*   nautilus in a kde environment? try lisa! it is part of kde-base/kdenetwork and you can start it with /etc/init.d/lisa start
> 
> edit the lisa settings in kde or edit it directly in the shell:
> 
> ```
> ...

 

then why don't you configure it?

cheers

SteveB

----------

## Red Nalie

 *steveb wrote:*   

>  *Red Nalie wrote:*    *steveb wrote:*   nautilus in a kde environment? try lisa! it is part of kde-base/kdenetwork and you can start it with /etc/init.d/lisa start
> 
> edit the lisa settings in kde or edit it directly in the shell:
> 
> ```
> ...

 

How, if it doesn't exist?  :Confused: 

----------

## Glasswalker

 *steveb wrote:*   

> i think you need to use a username and password to login into that computer and you need to specify a share you want to mount.
> 
> if you want quickly to scan your complete network for anonymous shares, then try:
> 
> ```
> ...

 

ok is there a way to do that insanely long mount line in my fstab? i have 4 win2k server shares i mount and have no write access as any user (including root)

here's my fstab:

```

# /etc/fstab: static file system information.

# $Header: /home/cvsroot/gentoo-src/rc-scripts/etc/fstab,v 1.10 2002/11/18 19:39                                                          

:22 azarah Exp $

#

# noatime turns of atimes for increased performance (atimes normally aren't

# needed; notail increases performance of ReiserFS (at the expense of storage

# efficiency).  It's safe to drop the noatime options if you want and to 

# switch between notail and tail freely.

# <fs>                  <mountpoint>    <type>          <opts>          <dump/pa                                                          

ss>

# NOTE: If your BOOT partition is ReiserFS, add the notail option to opts.

/dev/hda1               /boot           ext3            noatime         0 2

/dev/hda3               /               reiserfs        noatime         0 1

/dev/hda2               none            swap            sw              0 0

/dev/hdb1               /home           reiserfs        noatime         0 3

/dev/sdb1               /usr            reiserfs        noatime         0 4

/dev/sdc1               /var            reiserfs        noatime         0 5

proc                    /proc           proc            defaults        0 0

//lasombra/media        /mnt/media      smbfs           defaults,users,username=                                                          

xxxx,password=xxxxxxxx  0 0

//lasombra/other        /mnt/other      smbfs           defaults,users,username=                                                          

xxxx,password=xxxxxxxx  0 0

//lasombra/users        /mnt/users      smbfs           defaults,users,username=                                                          

xxxx,password=xxxxxxxx 0 0

//lasombra/vault        /mnt/vault      smbfs           defaults,users,username=                                                          

xxxx,password=xxxxxxxx  0 0

/dev/hdd                /mnt/dvd        iso9660         noauto,ro,users

# glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for

# POSIX shared memory (shm_open, shm_unlink). Adding the following

# line to /etc/fstab should take care of this:

# (tmpfs is a dynamically expandable/shrinkable ramdisk, and will use almost no

#  memory if not populated with files)

tmpfs                   /dev/shm        tmpfs           defaults        0 0

```

oh and if anyone sees anything else funky about how i'm doing things let me know since i'm a n00b and might've screwed up somewhere that's not apparent yet   :Rolling Eyes: 

----------

## steveb

what do you mean with write support? are you able to mount them? does your kernel support smb?

what do you get as output for the following code:

```
echo;if (! grep -qi smbfs /proc/filesystems);then echo "Your current kernel does not supports SMB.";if (! grep -qi CONFIG_SMB_FS= /lib/modules/$(uname -r)/build/.config);then echo "Your current kernel configuration does not have SMB support activated.";else echo "Your current kernel configuration has SMB support activated.";fi;else echo "Your current kernel has SMB support activated.";fi;echo
```

how about the following fstab entries:

```
//lasombra/media   /mnt/media   smbfs      rw,users,exec,uid=glasswalker,gid=glasswalker,dmask=777,fmask=777,workgroup=glasswalker,username=xxxxxx,password=xxxxxxxx   0 0

//lasombra/other   /mnt/other   smbfs      rw,users,exec,uid=glasswalker,gid=glasswalker,dmask=777,fmask=777,workgroup=glasswalker,username=xxxxxx,password=xxxxxxxx   0 0

//lasombra/users   /mnt/users   smbfs      rw,users,exec,uid=glasswalker,gid=glasswalker,dmask=777,fmask=777,workgroup=glasswalker,username=xxxxxx,password=xxxxxxxx   0 0

//lasombra/vault   /mnt/vault   smbfs      rw,users,exec,uid=glasswalker,gid=glasswalker,dmask=777,fmask=777,workgroup=glasswalker,username=xxxxxx,password=xxxxxxxx   0 0
```

please replace the uid=glasswalker and gid=glasswalker and workgroup=glasswalker and username= and password= with your correct values.

cheers

SteveB

----------

## brain

You don't need nautilus in a KDE environment.

If you have Samba already on the machine (which it sounds like you do), a:

smb://servername

In a Konquerer window is all you need to do.  I use KDE at work on our Windows network, and Konq can actually read shares of 50,000+ files that Windows' own Explorer usually pukes on!

----------

## Red Nalie

People, my problem still aint fixxed...

All I need to know, is how I can STOP Samba from chanching the user-ownage of all the files....

----------

