LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Samba: Cannot access share files from win98 but winxp ok (https://www.linuxquestions.org/questions/linux-general-1/samba-cannot-access-share-files-from-win98-but-winxp-ok-520705/)

Niceman2005 01-18-2007 08:29 PM

Samba: Cannot access share files from win98 but winxp ok
 
Dear friends,

I have configured my smb.conf as follow:
[global]
workgroup = ABC
netbios name = pc1
security = user
encrypt password = yes

[Music]
path = /MyMusic
valid users = user1
guest ok = yes
writable = yes

When i access from WinXP, it works fine with the username=user1 and password, but when i access from win98 it prompt a box that automatically fill the username with //pc1/11 and password request me to fill in. When i fill in the password of user1 it didnt work and reprompt. Why does it work on WINXP while win98 seems not working with the same configuration file? any idea ? or is there way i can configure so it will just allow access rather than ask for username and password?

thanks for taking time helping!

Regards
Y

cyberfreaker2k 01-19-2007 01:47 AM

win9x does not suport user security with encryption i beleive
try security=share
and encryption=no

doc.nice 01-19-2007 08:24 AM

NACK, cyberfreaker2k: Win 98 can use encrypted passwords with user mode, this is the default setting in Win98, you must explictily change a registy value to use unencrypted passwords!

You have to use a username that exists on the samba server, so in your case, you could use username "user1". Wehen these credentials will work from winXP, they also should work from Win 98.
To use the user 11 from machine pc1 (//pc1/11) you would have to create it on the linux machine using adduser AND smbpasswd. (as you did with user1 i assume)

excerpts from man smb.conf ([X] you want to read the whole manpage)
Quote:

encrypt passwords (G)
This boolean controls whether encrypted passwords will be negotiated
with the client. Note that Windows NT 4.0 SP3 and above and also
Windows 98 will by default expect encrypted passwords unless a reg-
istry entry is changed. To use encrypted passwords in Samba see the
chapter "User Database" in the Samba HOWTO Collection.

MS Windows clients that expect Microsoft encrypted passwords and
that do not have plain text password support enabled will be able to
connect only to a Samba server that has encypted password support
enabled and for which the user accounts have a valid encrypted pass-
word. Refer to the smbpasswd command man page for information
regarding the creation of encrypted passwords for user accounts.

The use of plain text passwords is NOT advised as support for this
feature is no longer maintained in Microsoft Windows products. If
you want to use plain text passwords you must set this parameter to
no.

In order for encrypted passwords to work correctly smbd(8) must
either have access to a local smbpasswd(5) file (see the smb-
passwd(8) program for information on how to set up and maintain this
file), or set the security = [server|domain|ads] parameter which
causes smbd to authenticate against another server.

Default: encrypt passwords = yes

[...]

security (G)
[...]
The default is security = user, as this is the most common setting
needed when talking to Windows 98 and Windows NT.

you may also be interested in this (specially the HOWTO): http://de.samba.org/samba/docs/

cyberfreaker2k 01-21-2007 09:45 PM

Sorry about the Wrong Info
 
Thanks doc.nice for shedding Light!!

Niceman2005 01-22-2007 12:47 AM

Hi Guys,

Thanks a lot for your replies. Continue on my initial thread, the configuration i did works well with XP, when trying to access the pc1, it authenticates me for username and password. By entering the username=user1 and password, i managed to access the samba server.
However the same configuration didnt work for win98...what happens is, when i try to access the samba server from win98, it prompts me with following:

Enter Network password

You must supply a password to make this connection:
Resource: \\pc1\IPC$ (This is not editable)
Password: (This is editable)


Ok
Cancel


Weird, no matter how i change the configuration, the Resource tag is always there and not editable, contrasting to Win xp, xp enquires username and password, i dont understnad why win98 keep prompting with the Resouce tag and password.
I have tried to simplify the smb.conf very simple....still not working...

thanks a lot for taking time helping,

Regards
Y

doc.nice 01-22-2007 06:24 AM

check this:
in smb.conf, you should set "Map to Guest = Bad User" in Global section

The default is "Never", but Win98 will try to connect to IPC$ (the share list etc.) with the currently logged on user. So you may have two ways to solve your problem:
1) Enable map to guest = bad user to allow your win98-client to get access to ipc$
2) create an linux+smb user with same username as your win 98 user

the first one seems to be the better choice, thats why I recommended it above...

if it doesn't help, could you please post your /var/log/log.smbd?


btw: normally, there is a sample smb.conf file in your doc folder or in /etc/samba, you should use this one and adapt it to your needs, that would give you reasonable defaults for such options like "Map to guest" etc.

HTH,
Flo

Niceman2005 01-22-2007 07:16 PM

Hi doc.nice!

Wow! thanks a lot, it works now hehe. After adding the line Map to Guest = Bad User.
Thanks a lot!

Thanks to cyberfreak too!! thanks!

simke 08-22-2008 03:50 AM

G'day Doc.Nice! I tried your solution but Win98 client still can't access to Samba, Win XP client OK! Here attached smb.conf:
[global]
workgroup = Workgroup
printing = cups
printcap name = cups
printcap cache time = 750
cups options = raw
load printers = Yes
use client driver = Yes
map to guest = Bad User
include = /etc/samba/dhcp.conf
logon path = \\%L\profiles\.msprofile
logon home = \\%L\%U\.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 = No
domain master = No
smb ports = 139
netbios name = Suse
server string = Samba on Suse 11.0
security = User
encrypt passwords = Yes

[printers]
comment = All Printers
path = /var/tmp
printable = Yes
# create mask = 0600
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

;
## Share disabled by YaST
# [netlogon]

[samba]
comment = Samba share on Suse 11.0
inherit acls = Yes
path = /Samba/
read only = Yes

Thanks.

doc.nice 08-24-2008 09:48 AM

Do you have a user on linux with the same name as in windows or do you try the guest version I mentioned above?

you may try if it helps creating a linux user
(using adduser or useradd) and then enabling it for samba using smbpasswd and/or pdbedit...

if it does not work, posting a smbd.log file may help identifying the problem.

another problem could be that the files or directory are not accessible by the linux nobody user that is used for the samba guest access...
try setting o+rx for the directory /Samba/ (chmod o+rx /Samba/) and at least read access for the files (chmod o+r /Samba/*, see man chmod for more).

simke 08-24-2008 09:49 PM

Quote:

Originally Posted by doc.nice (Post 3257897)
Do you have a user on linux with the same name as in windows or do you try the guest version I mentioned above?
Simke: Yes, both.

you may try if it helps creating a linux user
(using adduser or useradd) and then enabling it for samba using smbpasswd and/or pdbedit...
Simke: Yes, did that!

if it does not work, posting a smbd.log file may help identifying the problem.

another problem could be that the files or directory are not accessible by the linux nobody user that is used for the samba guest access...
try setting o+rx for the directory /Samba/ (chmod o+rx /Samba/) and at least read access for the files (chmod o+r /Samba/*, see man chmod for more).

Simke: Yes, did that too.

G'day Doc.Nice! Sorry for not explaining clearly earlier! Here is the actual situation:
From Win98 client, it prompts me with following:

Enter Network password

You must supply a password to make this connection:
Resource: \\suse\IPC$ (This is not editable)
Password: (This is editable)

Even though I logged in Win98 client with the same username & password I did on my Win XP client, it didn't work!

Here, I attached my smbd.log:
[2008/08/23 10:42:39, 0] printing/print_cups.c:cups_connect(68)
Unable to connect to CUPS server localhost:631 - Address family not supported by protocol
[2008/08/23 10:42:39, 0] printing/print_cups.c:cups_connect(68)
Unable to connect to CUPS server localhost:631 - Address family not supported by protocol
[2008/08/23 16:03:07, 1] smbd/service.c:make_connection_snum(1188)
bis-7 (192.168.0.204) connect to service laserjet1000 initially as user simke (uid=1000, gid=100) (pid 3993)
[2008/08/23 16:04:10, 1] smbd/service.c:close_cnum(1399)
bis-7 (192.168.0.204) closed connection to service laserjet1000
[2008/08/23 16:08:21, 1] smbd/service.c:make_connection_snum(1188)
bis-7 (192.168.0.204) connect to service laserjet1000 initially as user simke (uid=1000, gid=100) (pid 9638)
[2008/08/23 16:09:45, 1] smbd/service.c:close_cnum(1399)
bis-7 (192.168.0.204) closed connection to service laserjet1000
[2008/08/23 16:11:44, 1] smbd/service.c:make_connection_snum(1188)
bis-7 (192.168.0.204) connect to service laserjet1000 initially as user simke (uid=1000, gid=100) (pid 9718)
[2008/08/23 16:12:47, 1] smbd/service.c:close_cnum(1399)
bis-7 (192.168.0.204) closed connection to service laserjet1000
[2008/08/25 08:41:19, 0] smbd/server.c:main(1208)
smbd version 3.2.0rc1-22.1-1795-SUSE-SL11.0 started.
Copyright Andrew Tridgell and the Samba Team 1992-2008

Note that on 23rd-Aug successful log-in was from Win XP client. Win98's failed attempts were not recorded at all including today 25th-Aug's attempts!
Thanks.

doc.nice 08-25-2008 05:06 PM

i will diff your config posted above with my one and will return... hold on

doc.nice 08-31-2008 11:22 AM

ok, sorry for the long time waiting.

My config file differs from yours only in some relevant settings:
I completely omitted the two following lines:
Code:

security = User
 encrypt passwords = Yes

and my config sets
Code:

domain logons = Yes
 os level = 65
 preferred master = Yes
 domain master = Yes
 wins support = Yes

but I think this should not be relevant for you, as I use my samba server as primary domain controller...

so sorry to help you not any more, this is all my wisdom provides... ;)

simke 09-05-2008 12:47 AM

Thank you anyway for your help, Doc.Nice!
At least, now I managed to get the network printer to work with Win98 PCs.
Am still trying out ways to access those folders share on Samba!
Will post an update if there is any break through!

Regards,

doc.nice 09-05-2008 01:13 AM

I wuld be happy to read the final resolution here, thanks. Hope you will succeed...

tonyoh888 09-26-2008 01:36 AM

Quote:

Originally Posted by simke (Post 3270199)
Thank you anyway for your help, Doc.Nice!
At least, now I managed to get the network printer to work with Win98 PCs.
Am still trying out ways to access those folders share on Samba!
Will post an update if there is any break through!

Regards,

you can try to set below at global settings
username map = /etc/samba/user.map

this is contents of user.map
aaa bbb

aaa = user in linux
bbb = user in windows 98

this is to map the windows 98 user name with linux user name


All times are GMT -5. The time now is 03:36 PM.