LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-09-2008, 07:05 PM   #1
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Rep: Reputation: 41
can't access network drives even with correct password


my family loves to use windows and im the only one with a linux box, so i have to use samba to share files over the network. the problem is, if i try to copy a file from the WINDOWS directory, it will ask me to authenticate. even after the correct password and username has been put in, it authenticate dialog appears again. and if i click cancel, it says access denied. the account on the other end exists, and has all the privliges

thanks,
rabbit2345
 
Old 06-09-2008, 07:50 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The Windows user should also have an account on Linux, and you should use the "smbpasswd" command to enter the username and password. This will create an entry in the /etc/samba/smbpasswd file. This file is similar to the /etc/passwd file. The entry in the file is used to authenticate with samba or windows. The entry in Linux's /etc/passwd file contains your Linux username and the UID (user ID). The kernel uses the UID to determine whether you have permission to read or write files on a Linux filesystem.

There are different password backends that Samba might use. The smbpasswd file is the most basic and the default. It is fine to use it if you have fewer than 20 users. Check your /etc/samba/smb.conf file to make sure that you aren't using a different password backend.
Quote:
Originally Posted by man smb.conf
Available backends can include:
  • smbpasswd - The default smbpasswd backend. Takes a path to the smbpasswd file as an optional argument.
  • tdbsam - The TDB based password storage backend. Takes a path to the TDB as an optional argument (defaults to
    passdb.tdb in the private dir directory.
  • ldapsam - The LDAP based passdb backend. Takes an LDAP URL as an optional argument (defaults to ldap://localhost)
Other information you haven't supplied is the security mode. I'm guessing that "security = user", which is the default, is what you have.

You also haven't posted the definition of the samba service, or the permissions on the directory being shared.

For example, if you are sharing your own home directory, only you should have permission access the share and to read and write to both the directory and the samba share. If on the other hand you want a globally writable service, it would be better to create a directory with global permissions.

Example:
Code:
sudo mkdir /srv/samba/share
sudo chmod ugo=rwxt /srv/samba/share
In the main section of smb.conf, then use "map to guest = Bad User". Then use a share definition like this:
Code:
[Share]
path = /srv/samba
guest ok = Yes
read only = No
This will allow any user to access the share and read and write files there. If the user is authenticated (i.e. a samba user and a linux user) then the file will be owned by the user. Otherwise the file will be owned by the user "nobody" which samba maps to the Windows user "guest". The sticky bit set on the directory being shared will prevent one (authenticated) user from deleting the file owned by another. The permissions on the file (created by the owner) can protect the file against reading and/or writing.

Last edited by jschiwal; 06-09-2008 at 07:54 PM.
 
Old 06-09-2008, 09:03 PM   #3
rabbit2345
Member
 
Registered: Apr 2007
Location: SC
Distribution: Kubuntu 20.04 LTS
Posts: 378

Original Poster
Rep: Reputation: 41
im not sure what you mean by definition of the service, could you please clarify?

and also, do you want the permissions for the windows end or the linux side?
i am trying to connect from linux to windows in order to copy files, it seems that you thought i was trying to access my linux box from windows

thanks,
rabbit2345
 
Old 06-10-2008, 01:55 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Yes, I thought you wanted to connect from Windows to Linux. You still need to run "smbpasswd" so the Linux user becomes a samba user with a windows style UID.

Also check the permissions of the Windows machine. Does the corresponding windows (at the Windows computer) user have write permission on the directory? Browse to the share from the Windows machine and check that way as well.

Last edited by jschiwal; 06-10-2008 at 01:56 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
require username and password for network access mpyusko Linux - Security 7 11-19-2007 04:51 AM
kdesu gives incorrect password error with correct password. dasy2k1 SUSE / openSUSE 1 04-16-2007 10:34 AM
What is the correct way of partition/format extra hard drives? ExCIA Linux - Newbie 6 05-01-2005 03:33 PM
Can't login; password is correct ticky87 Linux - General 2 08-15-2004 07:32 PM
Cannot log in with CORRECT password Citizen Bleys Linux - Security 2 07-24-2003 10:15 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:20 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration