Mounting Linux drive on Linux: error 21874

Mounting Linux drive on Linux: error 21874

am 18.02.2005 23:11:01 von Eve Atley

Hi folks,

I'm attempting to mount a Linux drive via Samba from a Linux box like so:

mount -t smbfs -o
username=someusername,password=somepassword,workgroup=workgr oup
//localhost/dev/hda3 /mnt/devbox

This error results:
21874: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password
pair in a Tree Connect or Session Setup are invalid.)

Directory's been created (devbox) under /mnt/ directory. DF on the box I'm
attempting to mount shows:

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda3 30233928 12852120 15845996 45% /
/dev/hda1 101089 9193 86677 10% /boot
/dev/hda2 42330704 3414040 36766364 9% /opt
none 514528 0 514528 0% /dev/shm

I know the username and password is correct, but the name of the box may not
be (shows 'localhost' at prompt when logged in).

What am I doing incorrectly?

Thanks,
Eve


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

Re: Mounting Linux drive on Linux: error 21874

am 19.02.2005 00:15:54 von Ray Olszewski

At 05:11 PM 2/18/2005 -0500, Eve Atley wrote:

>Hi folks,
>
>I'm attempting to mount a Linux drive via Samba from a Linux box like so:
>
>mount -t smbfs -o
>username=someusername,password=somepassword,workgroup=workg roup
>//localhost/dev/hda3 /mnt/devbox
>
>This error results:
>21874: session setup failed: ERRSRV - ERRbadpw (Bad password - name/password
>pair in a Tree Connect or Session Setup are invalid.)
>
>Directory's been created (devbox) under /mnt/ directory. DF on the box I'm
>attempting to mount shows:
>
>Filesystem 1K-blocks Used Available Use% Mounted on
>/dev/hda3 30233928 12852120 15845996 45% /
>/dev/hda1 101089 9193 86677 10% /boot
>/dev/hda2 42330704 3414040 36766364 9% /opt
>none 514528 0 514528 0% /dev/shm
>
>I know the username and password is correct, but the name of the box may not
>be (shows 'localhost' at prompt when logged in).
>
>What am I doing incorrectly?


It is hard to say for sure ... but I too am suspicious of "localhost". It
is probably just a bad config of the SMB server host (a bad entry in
/etc/hostname). But the client you are trying to mount from sees
"localhost" as itself (a standard convention, which you'll almost surely
see as an entry in /etc/hosts that resolves localhost to 127.0.0.1, the
machine's own "lo" interface).

Try replacing "localhost" in the mount argument with the actual IP address
of the SMB server host or with something that the *client* host can resolve
to that IP address (exactly what depends on how you've set up your on-LAN
DNS or the contents of the client's /etc/hosts file ... whatever its
resolver uses for LAN hosts).

If that is not it ... how do you "know" the password is correct? Samba
passwords are not necessarily the same as shell login passwords ... whether
they are the same or different is site-specific, so ask the server's
sysadmin how this server is set up (unless that's you, of course, in which
case you already know about this part).


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

RE: Mounting Linux drive on Linux: error 21874

am 19.02.2005 00:31:25 von Eve Atley

Hello again and thanks,

Trying this one:
mount -t smbfs -o
username=someusername,password=somepassword,workgroup=workgr oup
//192.168.10.28/dev/hda3 /mnt/devbox
(perhaps this is incorrect syntax?)

And getting this:
Error connecting to 192.168.10.28 (No route to host)
23617: Connection to 192.168.10.28 failed
SMB connection failed

There *should* be a route to host, since I can SSH into the box. :) 'uname
-a' does indeed show the hostname as 'localhost'. The /etc/hosts file shows
the standard 127.0.0.1 localhost entry. And as the 'unofficial' sysadmin,
I'm sure of the system's username/password. So, I'm going out on a limb here
and guessing that maybe I should change the hostname so that uname reports
something other than localhost.

If that's a good guess, what's the best way to go about it?

My only other guess is that Samba is not configured on 192.168.10.28...

Thanks,
Eve


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

RE: Mounting Linux drive on Linux: error 21874

am 19.02.2005 01:59:54 von Ray Olszewski

At 06:31 PM 2/18/2005 -0500, Eve Atley wrote:

>Hello again and thanks,
>
>Trying this one:
>mount -t smbfs -o
>username=someusername,password=somepassword,workgroup=workg roup
>//192.168.10.28/dev/hda3 /mnt/devbox
>(perhaps this is incorrect syntax?)

I'm not really up to date on this, but I fiddled around here and got these
to almost work (password deleted here, of course):

kuryakin:/home/autovcr# mount -t smbfs -o username=ray,password=********
//waverly/shared_video /mnt

kuryakin:/home/autovcr# mount -t smbfs -o username=ray,password=********
//192.168.1.1/shared_video /mnt

The "almost" is because the kernel on kuryakin isn't set up to support
smbfs filesystems ... but both smbmount and the SMB server on waverly seem
to like this syntax). And it does seem to indicate that this syntax will
take an IP address, which was what I actually wanted to confirm.

So, compared to mine ... the workgroup= piece seems unneeded, and you need
to specify the name of the share the way it appears in your smb.conf file,
not the /dev entry for the filesystem ... but the next thing you write
suggests you have a different problem.

>And getting this:
>Error connecting to 192.168.10.28 (No route to host)
>23617: Connection to 192.168.10.28 failed
>SMB connection failed
>
>There *should* be a route to host, since I can SSH into the box. :)

Nothing to do here but check the routing table, right? netstat -nr is one way.

> 'uname
>-a' does indeed show the hostname as 'localhost'. The /etc/hosts file shows
>the standard 127.0.0.1 localhost entry. And as the 'unofficial' sysadmin,
>I'm sure of the system's username/password. So, I'm going out on a limb here
>and guessing that maybe I should change the hostname so that uname reports
>something other than localhost.
>
>If that's a good guess, what's the best way to go about it?

This is most likely irrelevant to your problem ... but this hostname is
just the contents of the file /etc/hostname . Whether you want to edit that
directly or change some script that writes a value here is distro specific,
sometimes even installation specific. Try editing the file by hand and see
if the change survives a reboot; if it doesn't, hunt for the init script
that writes to this file.

>My only other guess is that Samba is not configured on 192.168.10.28...

Even the "'unofficial' sysadmin" shouldn't have to guess about that. Tsk tsk.

In the output of "ps ax" on the server (192.168.10.28), you want to see
something like --

16498 ? Ss 2:29 /usr/sbin/nmbd -D
16500 ? Ss 0:00 /usr/sbin/smbd -D
16501 ? S 0:00 /usr/sbin/smbd -D

And you want a config files that specifies the share; I'm not sure how
standard to config-file location is, but my Debian systems default to
putting it in /etc/samba/smb.conf . You want in it stanzas that look
something like this (this is an on-LAN public share, so a bit different
from what you want):

[shared_files]
writable = yes
locking = no
path = /home/shared_files
public = yes

(This example is for a share that Windows systems connect to here all the
time. I never bothered to set up Linux access via SMB, since I still use
NFS for that.)

There is a lot more detail to setting up the SMB service than I've covered
here. If you get closer and have specific questions, please don'thesitate
to post again ... but right now, I don't know what specific problems you
might have aside from what your message identified, so I'll defer anything
more.


-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs