WIn XP can't access Linux files after upgrade

I upgraded from Suse 10.3 to 11.2, since when my Win XP box can’t access the Linux files. All was OK before upgrading. The Linux (Suse 11.2) can access the Win files fine using Samba and the workgroup. I guess this is an XP problem, but I’d appreciate helpful comments.:\

Open Dolphin and then enter the URL of smb://workgroup/ where workgroup is the name of your workgroup. Find the share name of your computer and go in and see what you can see. Try to create a text file or folder and see if it works for you, in the very PC doing the share that Windows can’t use. If you can not do these things through your own share, then the problem is with your Samba or disk partition setup. Many times, but not always, it could be a permissions issue with your shared partition. If you are sharing something other than your home area, perhaps you need to post a copy of your fstab file (/etc/fstab) and your smb.conf file (/etc/samba/smb.conf) so we can determine what might be wrong.

Thank You,

When upgrading that far, hopping a distance of 10.3, 11.0, 11.1, 11.2 – there could be an issue with Samba. I wonder about the file smb.conf, if that got conked:)
And defo the firewall settings are different. Here are a few things to check:

  • Look in yast → firewall → allowed services and make sure that these services are running: netbios server, samba server, samba client.
  • make sure the netbios name and workgroup are correctly defined in smb.conf (here’s a template for the [global] stanza)
  • make sure the name resolve order in [global] has ‘bcast’ first in line

For a thorough check have a read of this: Samba and Suse: HowTo Set up an openSUSE-Windows Home Office LAN/Network. Versions 11.x

On Sat August 21 2010 09:40 pm, swerdna wrote:

>
> When upgrading that far, hopping a distance of 10.3, 11.0, 11.1, 11.2 –
> there could be an issue with Samba. I wonder about the file smb.conf, if
> that got conked:)
> And defo the firewall settings are different. Here are a few things to
> check:
>
>
> - Look in yast → firewall → allowed services and make sure that
> these services are running: netbios server, samba server, samba
> client.
> - make sure the netbios name and workgroup are correctly defined in
> smb.conf (‘here’s a template’
> (http://opensuse.swerdna.org/lanprimer/smb.conf.lmb_pmb.txt) for the
> [global] stanza)
> - make sure the name resolve order in [global] has ‘bcast’ first in
> line
>
>
> For a thorough check have a read of this: ‘Samba and Suse: HowTo Set up
> an openSUSE-Windows Home Office LAN/Network. Versions 11.x’
> (http://opensuse.swerdna.org/suselanprimer.html)
>
>
toastrack;
One of the big changes in Samba between 10.3 and 11.2 was a change in the
default value of “passdb backend”, in 10.3 this was smbpasswd but with 11.2
it is tdb. If you have just one or two Samba users it would probably be
easiest just to recreate your Samba users with:


su
smbpasswd -a <username>

Alternatively you could add this parameter to /etc/samba/smb.conf:


passwd backend = smbpasswd

The above will work if /etc/samba/smbpasswd was not over written in the
upgrade. If it has been overwritten use the first option.

P. V.
“We’re all in this together, I’m pulling for you.” Red Green

  • Look in yast → firewall → allowed services and make sure that these services are running: netbios server, samba server, samba client.
  • make sure the netbios name and workgroup are correctly defined in smb.conf (here’s a template for the [global] stanza)
  • make sure the name resolve order in [global] has ‘bcast’ first in line

Thanks guys. sorted firewall OK, but smb.conf won’t let me modify it, even when I go to edit as Root. Further help needed please.

Show us the output of:


ls -l /etc/samba/smb.conf

Run one of these commands in a console/terminal window to edit smb.conf

  • KDE user: kdesu kwrite /etc/samba/smb.conf
  • Gnome user: gnomesu gedit /etc/samba/smb.conf

The problem might be the device you’re using to edit the file, and the commands above open GUIs for root in a special way.

This is what I get:-

linux-0qmt:/home/howard # ls -l /etc/samba/smb.conf
-rw-rw-r-- 1 root root 1659 2010-08-21 20:01 /etc/samba/smb.conf

does it help any ??

Yes, it confirms that the file belongs to the root user and therefore you have to use the method I recommended in my earlier post. It won’t bite, give it a go.

I think my reply failed to get through. Apologies if it now appears twic. I did what you suggested andedited smb.conf, using the template as a reference. May be I have done some wrong editing, as there is stuff in smb.conf which does not appear in the template. Now I can’t seem to access files either way. Looking from Linux to Win asks me now for a username and password, which i don’t want to have. The other way round I get Access Denied. Anyway, here (I hope) is a listing of smb.conf:-

smb.conf is the main Samba configuration file. You find a full commented

version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the

samba-doc package is installed.

Date: 2007-12-04

[global]
workgroup = woottonrise
netbios = Linux-0qmt
name resolve order = bcast host lmhosts wins
printcap name = cups
printcap cache time = 750
cups options = raw
use client driver = yes
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \%25L\profiles.msprofile
logon home = \%25L%25U.9xprofile
logon drive = P:
usershare allow guests = Yes
add machine script = /usr/sbin/useradd -c Machine -d /var/lib/nobody -s /bin/false %m$
domain logons = yes
domain master = yes
os level = 65
preferred master = yes
winbind gid = 10000-20000
winbind uid = 10000-20000
usershare max shares = 100
usershare owner only = False
security = share
restrict anonymous = no
null passwords = yes
pasdb backend = tdbsam

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes

[profiles]
comment = Network Profiles Service
path = /storagehdc2
read only = no
create mask = 0600
directory mask = 0700
guest ok = yes
inherit permissions = yes
case sensitive = no
strict locking = no
map system = yes
msdfs proxy = no

[users]
comment = All users
path = /home
read only = No
inherit acls = Yes
veto files = /aquota.user/groups/shares/

[groups]
comment = All groups
path = /home/groups
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0600
browseable = No

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

[netlogon]
comment = Network Logon Service
path = /var/lib/samba/netlogon
write list = root

Your smb.conf is a long way from the default file that is released with openSUSE 11.3.
Here is a copy in case you ever need it: default smb.conf

Before I recommend changes, a few questions.

This smb.conf is set up like a domain server, like one might use for a government department or other large enterprise. But the shares look like the shares one would find in a small workgroup. Is this LAN for a large enterprise (using a domain server) or a small affair, like a home or small office or small business grouping of workstations?

Do you want the external users to be able to log onto their home directories on the openSUSE machine?

Will you be sharing a printer from the openSUSE machine?

Do you want restricted access to the directory /storagehdc2 (give username/password) or unrestricted access (no usernames/passwords). And who is the Linux owner of the directory /storagehdc?

Thank you for your reply. My apologies for the delay - I only just discovered there is now a page 2 !! I and not gone cold on it.

To answer your questions:-

1., It’s a local network, just the two computers (Win XP and Suse 22.3) wired via a router which also accesses the internet of course and one other printer.

  1. Yes, I want each machine to be able to deal read write and execute where appropriate the files on both computers.

3.I want access to files without any password authentication.

  1. Yes, I want full sharing of two printers on the XP machine and one at present on the Suse machine.

  2. Yes, I want to access the storage drives, which I think at present I have wrongly mounted as the demand root.

At present the Win XP machine seems to be able to access fully the Linux machines files, but not vice-versa. This is the opposite situation from when all this began.
When last tried, each machine managed to print OK on another’s printer (not tested again today).

I have saved your smb.conf file and will keep it by till further davised.

Thanks for your help so far

I recommend this form for the file smb.conf, see the reasoning after the text:

# smb.conf is the main Samba configuration file. You find a full commented
# version at /usr/share/doc/packages/samba/examples/smb.conf.SUSE if the
# samba-doc package is installed.
# Date: 2009-10-27
[global]
workgroup = woottonrise
netbios name = Linux-0qmt
name resolve order = bcast host lmhosts wins
server string = ""
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
load printers = yes
use client driver = yes
map to guest = Bad User
local master = yes
preferred master = yes
os level = 65
usershare allow guests = Yes
usershare max shares = 100
usershare owner only = False

[homes]
comment = Home Directories
valid users = %S, %D%w%S
browseable = No
read only = No
inherit acls = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
create mask = 0700
browseable = No
guest ok = Yes

[print$]
comment = Printer Drivers
path = /var/lib/samba/drivers
write list = @ntadmin root
force group = ntadmin
create mask = 0664
directory mask = 0775

Note the difference netbios → netbios name.
Also, you can put something nicer than Linux-0qmt as a network name, e.g. suzette_xp

The stuff about local master, preferred master, os level is optimum for talk between a Linux box and an xp box.

The [homes] share might be of use, read about it here: The Suse/openSUSE Default Shares
But it requires username/password access. If you don’t want that, delete the whole 6-line stanza [homes]…etc.

If you want a specific share in your home territory, you might use this method/stanza, let’s assume your Linux username is suzette and you have the files in your home territory at /home/suzette/music, use e.g. this:


[suzy music]
path = /home/suzette/music
read only = no
guest ok = yes
force user = suzette

This is optimised for no-passwords, no-username access, the location must be in suzette’s home territory. It would be illogical to have both types of shares [homes] and [suzy music].

You can read about various options for shares here: Defining and Using File Shares (Services)

The code about printers is optimised for sharing printers between windows and Linux computers.
For how to share a printer from Linux see here: Printer Sharing: openSUSE Samba Print Server

I don’t understand this statement about your drives:

…which I think at present I have wrongly mounted as the demand root.

Does this refer to shares that you see in the Linux network browser that you want to map to Linux mounts (i.e. mount in Linux folders)? If so, what are the details?

Thank you for all that helpful info. Wow, I have some thinking and testing to do now. I guess the smb.conf file you give is the whole of what’s needed - the old stuff on the end is superfluous?

Re my remark about the “storage” drives (which 11.2 now seems to be using), when I try to access them in Dolphin I get told I need root privilege to see them.

Lastly, While I can now use the linux printer from XP, I can no longer use the XP printer from Linux. Not sure what has changed, and CUPS shows “printer available”. Yet when I try a Print Test Page I get told “unable to connect CIFS host”, or something like that. I’ve spent time looking in CUPS but found no hint as to what’s wrong.

You said:

Lastly, While I can now use the linux printer from XP, I can no longer use the XP printer from Linux. Not sure what has changed, and CUPS shows “printer available”. Yet when I try a Print Test Page I get told “unable to connect CIFS host”, or something like that. I’ve spent time looking in CUPS but found no hint as to what’s wrong.
I suggest you dump the old setup and re-do it, can’t really say what might be changed. Here’s a method that I’m using now to print to a windows printer froman openSUSE 11.3 computer: Windows Print Server for Suse/openSUSE Linux Clients. You would not bother with the bit on IP addressing (leave it as is) and skip the LPD options. Read it all but focus on the segment “Setting up a Linux client using Samba’s SMB/CIFS Protocol (alternative to LPD)”

You said:

I guess the smb.conf file you give is the whole of what’s needed - the old stuff on the end is superfluous?
In a word, yes. If you’re nervous about changing the smb.conf because it already partially works, you could back it up by running this command in a console window:

sudo cp /etc/samba/smb.conf /etc/samba/smb.conf.bak

then you can restore your old file at a future time from the “bak” file with the “mv” command (which you might need advice on or just read the man page).

You said:

Re my remark about the “storage” drives (which 11.2 now seems to be using), when I try to access them in Dolphin I get told I need root privilege to see them.
I’m still confused. This is what I think: maybe you have a hard drive attached to the motherboard or attached by USB and you’ve somehow mounted it in directory /storagehdc – and you’d like to share it to the windows machine; but there’s a problem with the permissions when you’re trying to connect from the windows machine. Here’s four questions to get me some more info:

  1. Is that right and if that’s not right, please paint the correct picture for me
  2. What’s the filesystem on the storage drive
  3. what do you see in response to this command in a console window:
/bin/mount | grep storagehdc
  1. what do you see in response to this command in a console window:
cat /etc/fstab | grep storagehdc

Thanks again. I’ll try to reply to your questions, but first some good news. I can now print to printers both ways. Somehow one IP address had got changed by 1 in the last digit, no idea how, but when corrected that problem solved.

  1. The “storage…” labelled partitions were, I think, wrongly mounted when under Suse 10.2. What I had wanted was just to increase the available storage for normal PC usage, but obviously did the wrong thing when partitioning. All HDDs are either STAT or EIDE connected directly to the mother board. I guess I need telling how to set up the correct mount point.

  2. File system is Ext4 in both case. In other areas there are some Ext3 partitions, I think relics of the Suse 10.3 setup.

3 & 4:-

howard@linux-0qmt:~> /bin/mount | grep storagehdc
(nothing in response)

howard@linux-0qmt:~> cat /etc/fstab | grep storagehdc
/dev/sdb2 /storagehdc2 ext3 defaults 1 2
/dev/sdb3 /storagehdc3 ext3 defaults 1 2
howard@linux-0qmt:~>

I general, I have commented out some of the apparently unnecessary stuff in smb.conf, and verified each time that nothing that was working has stopped working. Sadly the access problem to the WinXp files remains. Every time in Dolphin when I click on the workgroup icon I get told “please enter authorisation information” plus it wants a password. My root authentication stuff doesn’t work here. The crazy thing is that in the beginning when nothing else would work I could then access fully all the WinXP files without any request for authorisation.

I’d be glad of confirmation as to how much of the rest of smb.conf might be removed, toward duplicating the template which you provided, without wrecking what is already working. Or should I just leave it, as doing no harm ?

I really do appreciate your patience as I struggle to master more of Suse and work towards leaving all Win stuff behind.

I see from the data you gave me in your last post that there are some mis-configurations. Let’s get them straightened out.
Firstly these data point to ext3 filesystems when you said you thought you had ext4:

/dev/sdb2 /storagehdc2 ext3 defaults 1 2
/dev/sdb3 /storagehdc3 ext3 defaults 1 2

So please run this command and copy/paste the results here:

sudo /sbin/fdisk -l

that will tell exactly what filesystems are sensed by your operating system.

Next this line in smb.conf “path = /storagehdc2” expects a mount at /storagehdc2 but these data show no mount at that location:

howard@linux-0qmt:~> /bin/mount | grep storagehdc
(nothing in response)

So please run this command to see all the mounted partitions and paste back here:

/bin/mount

I’d also like to see if there are any files in the directories storagehdc2 and 3, I think not, but let’s check, run these commands and paste here please:

ls -l /storagehdc2
ls -l /stoargehdc3

That will do for now.

Maybe also I can comment out or delete the whole of the [profiles] section of smb.conf ??

Now done the last two commands (otherstuff had appeared in the cxommands in square brackets before):-

howard@linux-0qmt:~> ls -l /storagehdc2
total 0

howard@linux-0qmt:~> ls -l /storagehdc3
total 0

And also, the earlier command:-

howard@linux-0qmt:~> /bin/mount
/dev/sdc1 on / type ext3 (rw,acl,user_xattr)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
udev on /dev type tmpfs (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
/dev/sdc2 on /home type ext3 (rw,acl,user_xattr)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
securityfs on /sys/kernel/security type securityfs (rw)
howard@linux-0qmt:~>

Going to Disk Information gives the following:-

Disk Information
Device
Filesystem
Total space
Available space
hdc3 Suse 11.2 d ext4 92.5 GiB
sda2 Suse10.2 da ext3 23.8 GiB 2.6 GiB
21.2 GiB
sda1 Suse 10.3 B ext3 12.9 GiB 1.6 GiB
11.3 GiB
/dev/fd1
hdc2 Suse 11.2 B ext4 20.0 GiB
/dev/fd0
hda1 Storage%spa ext4 74.5 GiB