Friday, September 5, 2008

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

> (I think it uses /etc/init.d/samba for all the samba services. It may
> be "/etc/init.d/smb". When in doubt a "grep -i samba /etc/init.d" should
> find the right file.)

That won't work. You can do one of the following, though:
grep -i samba /etc/init.d/*
- or -
grep -ri samba /etc/init.d

The -r tells it to be 'recursive' and work on the whole directory,
allowing you to provide it with a directory for an argument.

The -i tells it to ignore case. Normally, grep wants files for
arguments, thus usually you would have to provide it with a wildcard on
the command-line.

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

On Thu, Sep 04, 2008 at 08:16:32PM -0400, Mark Warner wrote:
>> Try this:
>>
>> 1) service smb stop
>> 2) rm /etc/samba/secrets.tdb
>
> I have an install of the Debian Lenny based MEPIS 8 beta here at home,
> and the above file doesn't appear to exist. (The machine I've been
> working on is the Etch based MEPIS 7.)

RedHat uses a 'service' helper script, presumably to be more like
Windows. (You'd *think* it would handle dependancies, but then this *is*
RedHat we're talking about. They were a good five to seven years later
than Debian in adding package dependancies.)

In Debian, you can just stop and restart using the /etc/init.d scripts.
sudo /etc/init.d/samba stop
- and -
sudo /etc/init.d/samba start

(I think it uses /etc/init.d/samba for all the samba services. It may
be "/etc/init.d/smb". When in doubt a "grep -i samba /etc/init.d" should
find the right file.)

Cheers,

--
Steven Black <blacks@indiana.edu> / KeyID: 8596FA8E
Fingerprint: 108C 089C EFA4 832C BF07 78C2 DE71 5433 8596 FA8E

Thursday, September 4, 2008

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On Thu, 4 Sep 2008 at 8:16pm, Mark Warner wrote:

> Shing-Shong Shei wrote:
> > > Windows machine would *not* connect by \\server\share name, but it did
> > > connect by \\lan_ip\share.
>
> Response inline...
>
> > Try this:
> >
> > 1) service smb stop
> > 2) rm /etc/samba/secrets.tdb
>
> I have an install of the Debian Lenny based MEPIS 8 beta here at home, and the
> above file doesn't appear to exist. (The machine I've been working on is the
> Etch based MEPIS 7.)

The secrets.tdb file may be stored in a different location. On my
gentoo system, this file is located at
/var/lib/samba/private/secrets.tdb

This file contains the SID and machine password for your server.

> > 3) find /var/cache/samba -type f | xargs rm
>
> Would you mind telling me what the above command is actually doing? Looking at
> the xargs man page, it appears that I'm removing something??? from
> /var/cache/samba???

This is removing all files from the /var/cache/samba directory and all
subdirectories underneath. From man smbd:

TDB FILES
Samba stores it's data in several TDB (Trivial Database) files,
usually located in /var/lib/samba.

(*) information persistent across restarts (but not necessarily
important to backup).

account_policy.tdb*
NT account policy settings such as pw expiration, etc...
...

Based on the directory name and its contents, removing all of the
files here isn't a big issue, as long as the smb service is stopped at
the time.

If you are curious as to the contents of any of these files, the
simplest way to review their contents is probably with the tdbdump
command, which is included with samba.

chris

- --
Chris Shelton
Indiana University - Financial Management Services
- -

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iD8DBQFIwI7zM5TknMKatUwRAu3SAJ9PJiNssApl8ux16dVqxTRtjAQcbwCfVVQO
yUsnaRB8C1EPlX2wOBd5/eY=
=sImo
-----END PGP SIGNATURE-----

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

Shing-Shong Shei wrote:
>> Windows machine would *not* connect by \\server\share name, but it did
>> connect by \\lan_ip\share.

Response inline...

> Try this:
>
> 1) service smb stop
> 2) rm /etc/samba/secrets.tdb

I have an install of the Debian Lenny based MEPIS 8 beta here at home,
and the above file doesn't appear to exist. (The machine I've been
working on is the Etch based MEPIS 7.)

> 3) find /var/cache/samba -type f | xargs rm

Would you mind telling me what the above command is actually doing?
Looking at the xargs man page, it appears that I'm removing something???
from /var/cache/samba???

> 4) service smb start

Thanks for your interest. I appreciate learning opportunity.

(Everything's relative, that's for sure. In nearly every other circle,
I'm considered the "computer genius". This kind of experience keeps me
humble.)

--
Mark Warner
SimplyMEPIS Linux v6.5
Registered Linux User #415318

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

> Windows machine would *not* connect by \\server\share name, but it did
connect by \\lan_ip\share.

Try this:

1) service smb stop
2) rm /etc/samba/secrets.tdb
3) find /var/cache/samba -type f | xargs rm
4) service smb start

Good luck!

Shing-Shong


_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

On Thu, Sep 4, 2008 at 5:58 PM, Mark Warner <markwarner1954@att.net> wrote:
> Well, at least I've got one of them connected and working.
>
> Added the [security = shared] parameter and [workgroup = WORKGROUP],
> reloaded smb.conf, then restarted the samba daemon.
>
> Windows machine would *not* connect by \\server\share name, but it did
> connect by \\lan_ip\share.

Sounds like a name resolution problem, now. DNS, WINS, or NetBIOS.

> Now all I need to do is get the owner out from behind his machine long
> enough to get him hooked up and this little adventure will be over with.
>
> Thanks to all for the pointers, handholding, and sympathy.

Hey, no problem. You done good!

> --
> Mark Warner
> SimplyMEPIS Linux v6.5
> Registered Linux User #415318

Simón

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug

Re: [BLUG] SUCCESS! Certain XP machines won't connect to Samba share

Simón Ruiz wrote:
> Steven Black wrote:
>> I noticed there didn't seem to be a "Workgroup" setting in the
>> samba.conf file, so Samba would appear to be using the default. (Though
>> I wasn't specifically looking to see if it was using a Windows Domain
>> Server, as I've no experience there. If you're using one, then you don't
>> have a workgroup anymore.)
>
> The "workgroup" option in Samba is still meaningful whether you're
> joined to a domain or not, as it determines the NetBIOS network
> browsing stuff.
>
> I think. ;-) Like I said, I've had enough headaches from Samba I
> refuse to claim I understand it, just that I've wrestled it into
> compliance once or twice.

Well, at least I've got one of them connected and working.

Added the [security = shared] parameter and [workgroup = WORKGROUP],
reloaded smb.conf, then restarted the samba daemon.

Windows machine would *not* connect by \\server\share name, but it did
connect by \\lan_ip\share.

Now all I need to do is get the owner out from behind his machine long
enough to get him hooked up and this little adventure will be over with.

Thanks to all for the pointers, handholding, and sympathy.

--
Mark Warner
SimplyMEPIS Linux v6.5
Registered Linux User #415318

_______________________________________________
BLUG mailing list
BLUG@linuxfan.com
http://mailman.cs.indiana.edu/mailman/listinfo/blug