Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I am having a strange occurance.
For some reason I cannot connect to a shared directory on my Linux box from my win98SE system.
When I connect, it asks for a password, which I type in, only to be told that the password is invalid.
This happens on a public directory and one that I have set up for only two users.
But, I can access both directories from my win2k box and my macintosh using my username and password.
I had security in my smb.conf set to user. I tried changing it to share, but it had no effect.
Am I missing something basic or what?
Maybe I'm not explaining this right.
I have encrypted passwords = yes
I have security = user
I have the user and password both under linux and samba.
I have no trouble logging in from 2 separate Win2k machines or my macintosh.
I only have problems logging in with my Win98 SE machines.
A problem I didn't have when this same Linux box was running Red Hat 7.1. I reloaded the system with Mandrake 8.2. Is there an issue with Mandrake 8.2 and Win98?
Here are the steps I follow from Win98:
I click on Network Neighborhood.
I click on my linux server name (server)
I click on the directory I want to access (downloads)
I am presented with a "Enter Network Password" dialog box
saying
You must supply a password to make this connection
resource: \\server\downloads
password:
When I type in my password, I get an error box stating the password is incorrect.
When I access the linux box from Win2k , I am presented no dialog box asking for a password.
Can you try using plaintext (regedit on win98, and encrypt=no in smb.conf) and see if you are still prompted. It may not be what you eventually want..but may aid troublshooting.
I. >Here are the steps I follow from Win98:
>I click on Network Neighborhood.
>I click on my linux server name (server)
Did you login to samaba ( server) using username/passwd what you have created in linux box, ?
If No, goto network neighbourhood, properties, &
set workgroup same as, your samba workgroup name
& in
i.e [global]
workgroup = <Workgroup Name> # Same as win98se network properties workgroup & domain spcified in client for microsoft networks properties.
make usre your win98 is configured to login to
samba domain, .. (domain=workgroup same as whhat you specify in smb.conf WORKGROUP)
then login, using username/password created in linux.
II. >I click on the directory I want to access (downloads)
in smb.conf,
[downloads]
.. your other configuration
path = < full Path to downloads >
guest ok = Yes
example for share called, files
[files]
comment = files directory
path = /mnt/files
browseable = yes
guest ok = yes
public = yes
writable = yes < If you want your user to write to the forlder, or else make it 'writable = no'>
Try using the same account info from your W2K machine for your Win 98 machine to log on to Samba in order to simplify things. That is, make sure you aren't using an invalid user/password combination by using the one from W2K which you know already works. If the other user account works, and you know that the account info you are using for Win 98 DOES work, maybe your folder permissions are not set correctly.
Second, make sure in Windows 98 SE that you are logged in as the user that has permissions to access SAMBA.
Third, check if your Windows 98 machine is indeed using encrypted passwords by modifying this line to read:
encrypted passwords = no
If those don't work, maybe a firewall is interfering. Swap cables (or just IPs with the W2k machines) to see if Samba lets you in.
I did try using the same account info from my win2k machine on the win98 machine. The result was the same.
I tried encrypt password = no. But then the shared directory on the Linux box wouldn't show at all in network neighborhood.
I don't understand this at all. When I was running Red Hat 7.1 on this Linux box, I was able to connect with the Win98SE boxes with no problem. I haven't changed anything on the Win98 boxes.
Anyway, here is my smb.conf file.
# Samba config file created using SWAT
# from localhost.localdomain (127.0.0.1)
# Date: 2002/07/17 10:37:46
# Global parameters
[global]
workgroup = WORK
server string = File-Server
encrypt passwords = Yes
log file = /var/log/samba/log.%m
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = lpstat
domain master = False
dns proxy = No
hosts allow = 10.168.110. 127.
printing = cups
[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
print command = lpr-cups -P %p -o raw %s -r # using client side printer drivers.
lpq command = lpstat -o %p
lprm command = cancel %p-%j
browseable = No
[downloads]
comment = file downloads
path = /home/downloads
guest account =
valid users = Bob Mary
admin users = Bob Mary
read only = No
My linux usernames and samba usernames are identical. Still I added these lines to smbusers:
Bob = Bob
Mary = Mary
I had an issue with the firewall on RH 7.1. when I first set it up. But I would think if the firewall was an issue here it would also block the win2k and Mac machines from connecting.
Ok. From your near "gotcha", I suspect that perhaps you did not generate the smbpasswd file from your /etc/passwd file? Type this in your console (as root of course):
cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd
This will generate a smbpasswd file from your system password file. Note that this DOES NOT copy your system password files, merely generates a list of users for Samba. Then, run smbpasswd <username> to generate a password. The password used for Samba need not be the same as the password used to logon to your Linux machine. After that, try logging in from the Windows 98 machine.
I suggest not to use SWAT, instead you make smb.conf manualy
add only lines which is required,.
I will modify my smb.conf, to match yours.
make user, you addes users , using smbpasswd command
#smbpasswd -a -u <username> press enter, it will ask for passwd... confirm passwd.
Below is smb.conf, modified, please go through the comment,
make necessary changes, to make it suitable for your machine go through, log file in log file = /var/log/samba/. I am Using Samba as Domain controller. ( I have not NT domains) on Redhat 7.2, the clients are all WIN98SE. be sure to use, smbpasswd command to update samba passwd file.
[global]
workgroup = <work>
server string = File-server
netbios name = <computer name>
printcap name = /etc/printcap
load printers = yes
# Uncomment this if you want a guest account, you must add this to /etc/passwd
# otherwise the user "nobody" is used
; guest account = pcguest
log file = /var/log/samba/log.%m
# Put a capping on the size of the log files (in Kb).
max log size = 50
# Security mode. Most people will want user level security. See
# security_level.txt for details.
security = user
# Password Level allows matching of _n_ characters of the password for
# all combinations of upper and lower case.
password level = 8
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
# The following are needed to allow password changing from Windows to
# update the Linux sytsem password also.
# NOTE: Use these with 'encrypt passwords' and 'smb passwd file' above.
# NOTE2: You do NOT need these to allow workstations to change only
# the encrypted SMB passwords. They allow the Unix password
# to be kept in sync with the SMB password.
unix password sync = Yes
passwd program = /usr/bin/passwd %u
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
remote announce = <boradcast address>
local master = yes
os level = 33
domain master = yes
preferred master = yes
# Enable this if you want Samba to be a domain logon server for
# Windows95/98 workstations.
domain logons = yes
# Where to store roving profiles (only for Win95 and WinNT)
# %L substitutes for this servers netbios name, %U is username
# You must uncomment the [Profiles] share below
logon path = \\%L\home\%U
# Windows Internet Name Serving Support Section:
# WINS Support - Tells the NMBD component of Samba to enable it's WINS Server
wins support = yes
dns proxy = no
case sensitive = no
#============================ Share Definitions ==============================
[homes]
comment = Home Directories
browseable = no
writable = yes
public = no
# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
path = /var/spool/samba
browseable = no
# Set public = yes to allow user 'guest account' to print
guest ok = no
writable = Yes
printable = yes
# This one is useful for people to share files
[tmp]
comment = Temporary file space
path = /tmp
read only = no
public = yes
[MyFolder]
comment = My Folder
path = /usr/local/myfolder
public = yes
browseable = yes
guest ok = yes
read only = no
# below, I have added no of users in group mentioned ie cstaff and users
# here users in group cstaff & users can access / read write to this share
write list = @cstaff, @users
force group = +users
force create mode = 0775
force directory mode = 0775
writeable = yes
# My Documents directory,for people in
# the "cstaff" group
[My-Documents]
path = /usr/local/myDocuments
public = yes
only guest = yes
read only =No
printable = No
write list = @cstaff, @users
force group = +users
force create mode = 0775
force directory mode = 0775
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.