LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 03-06-2003, 04:41 AM   #1
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Rep: Reputation: 15
Samba share question


I created a samba share on my linux machine. Then I try to access it from a Windows 2000 server machine.

But when I click on the linux machine icon in "Network Places", I get the error message saying I'm not authorized to log on.

What should I do to make this samba share accessible to Windows? Please help!
 
Old 03-06-2003, 12:11 PM   #2
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 466

Rep: Reputation: 30
Hi,

I was having the same problem.

(1) First, what you have to do is setup the Windows users as Linux users.

(2) Then you must map the Linux users to the Samba users
You do this by editing your smb.conf file. Page down to where you should see:

#Unix user can map to different samba names

Uncomment the line below which says "username map. . . "

After you make sure that you have the Windows users as Linux users and make sure your passwords are the same

Next type the following:

cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

Then type:

smbpasswd (username)

enter the password for each samba user.

Also, make sure you have encrypt passwords selected in the smb.conf file.

Then restart the service and if so, go to your smbpasswd file and look to see if your users are there at the bottom. If so, you're all set.

Hope this helps!

Scott
 
Old 03-06-2003, 04:08 PM   #3
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 466

Rep: Reputation: 30
Hey, didn't hear back from you, so I assume it worked.
 
Old 03-06-2003, 08:02 PM   #4
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
Not yet

I want to follow your instructions exactly.

But how do I "setup the Windows users as Linux users"?
 
Old 03-06-2003, 09:11 PM   #5
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 466

Rep: Reputation: 30
First go to your Users and Groups menu and enter your users there.

when you have entered your users on Linux, type the following at the command prompt:

cat /etc/passwd | mksmbpasswd.sh > /etc/samba/smbpasswd

Then type:

smbpasswd (username)

the system will prompt you for a password, enter the password you gave them for linux.

You should be all set after that.
 
Old 03-06-2003, 09:30 PM   #6
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
doesn't work. i guess there's something wrong with my smb.conf

how should i edit it?

does the ";" in "; path = /home/username" means to comment out this line, just like "#" does?
 
Old 03-06-2003, 09:34 PM   #7
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 466

Rep: Reputation: 30
But wait, have you put the users in as Unix users? They have to have the same password as the samba password!!

Yes, uncomment the line by taking out the # or ; Hopefully then it will work.

I'm running into a bunch of snags myself here. I've had to reinstall 3 times today.

Last edited by scottpioso; 03-06-2003 at 09:35 PM.
 
Old 03-06-2003, 09:44 PM   #8
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
when i click on the linux machine icon in my W2K's Network Places, i'm not even prompted to enter username and password; i just get message saying 'not authorized to log on'.

so i have these basic questions:
(1) where do i create user accounts that will be used to access the samba share on the linux machine? on Windows machine, or on Linux box?
(2) should a user's linux login password be the same as the samba password created for this user?

scott, you've been patient and helpful. gracias!
 
Old 03-06-2003, 10:04 PM   #9
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
and, how do i access a windows share from a linux box?
 
Old 03-06-2003, 10:06 PM   #10
scottpioso
Member
 
Registered: Jan 2003
Location: United States of America and damn proud of it!
Distribution: Ubuntu
Posts: 466

Rep: Reputation: 30
so i have these basic questions:
(1) where do i create user accounts that will be used to access the samba share on the linux machine? on Windows machine, or on Linux box?

Just make the samba users users on the Linux box with the same passwords by using that script I gave you before.

(2) should a user's linux login password be the same as the samba password created for this user?

YES!

Also, make certain in your smb.conf file that the samba password sync = yes

Also, make certain you restart smb after you're all done!

I don't know why or how you would access the Windows shares. Why would you want to do that?

Last edited by scottpioso; 03-06-2003 at 10:09 PM.
 
Old 03-07-2003, 01:51 AM   #11
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Rep: Reputation: 30
I've suffered similar misery with Samba.

Here is what I finally did. I got Swat going on the same machine that has the Samba shares and I added both a user for Samba in Swat and the same user for Linux the usual way. They don't appear to be the same thing. I was eventually prompted for a user name and I don't remember which one I added. I am still not sure what happened, but I finally got my share in XP Pro. I didn't have any luck adding my XP Pro users to Linux.

The documentation available for Samba is even worse then the usual Linux standards.
 
Old 03-07-2003, 02:00 AM   #12
correro
Member
 
Registered: Oct 2002
Distribution: RedHat 8.0
Posts: 140

Original Poster
Rep: Reputation: 15
what is Swat?

i think i'll have to go to the HOWTO. groan
 
Old 03-07-2003, 03:03 AM   #13
TexasDex
Member
 
Registered: Feb 2003
Location: The Attic. Nowhere near Texas.
Distribution: Gentoo, Kubuntu, formerly LFS, SuSE, and RedHat
Posts: 133

Rep: Reputation: 15
In Windows 2000:
If you use the following command in the prompt you may have better luck, and you won't have to bother syncing your Samba and W2k passwords.

NET USE :x \\compname\sharename /USER:myusername
and then type the password in the next prompt (which should ask for it) then you will connect and map the drive to letter X:

This way you can connect to a share with a username other than the one you used to log on. Might help.

SWAT=Samba Web Administration Tool
it's a GUI for creating a smb.conf file without using a text editor, just connect your browser to http://127.0.0.1:901 and (if SWAT is properly set up) you will be able to administer samba.
 
Old 03-07-2003, 11:58 AM   #14
SparceMatrix
Member
 
Registered: Aug 2002
Distribution: SME Server, CentOS
Posts: 219

Rep: Reputation: 30
Swat is a graphical user interface for configuring Samba that works from a browser. It's not impossible to set up. Documentation seems to be pretty complete. It has to be going as a service. You just type http://"Host name":901 and it comes up. Of course you have to have Apache going already on the machine you want to configure, but getting Apache going is a breeze.
 
Old 03-07-2003, 12:00 PM   #15
hsa
Member
 
Registered: Jan 2003
Posts: 50

Rep: Reputation: 15
u can find a tut to do that without any problems here:
http://www-1.ibm.com/servers/esdd/tutorials/samba.html
it works just fine.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Samba Share Question... SlakAdyct Linux - Software 1 10-15-2004 02:04 PM
Simple Samba 2.8 Howto SHARE question.. mariusak Linux - Software 1 03-01-2004 12:11 PM
Question about Samba 2.2.8a Setup to Share with Windows XP eternalcrow Linux - Software 2 12-15-2003 02:37 PM
Samba Share Question bkmesenbrink Linux - Software 1 05-07-2003 12:13 PM
samba / printer share question rioguia Linux - Software 1 11-22-2002 09:50 PM


All times are GMT -5. The time now is 01:53 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration