LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Samba share question (https://www.linuxquestions.org/questions/linux-general-1/samba-share-question-48529/)

correro 03-06-2003 03:41 AM

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!

scottpioso 03-06-2003 11:11 AM

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

scottpioso 03-06-2003 03:08 PM

Hey, didn't hear back from you, so I assume it worked.

correro 03-06-2003 07:02 PM

Not yet :)

I want to follow your instructions exactly.

But how do I "setup the Windows users as Linux users"?

scottpioso 03-06-2003 08:11 PM

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.

correro 03-06-2003 08:30 PM

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?

scottpioso 03-06-2003 08:34 PM

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.

correro 03-06-2003 08:44 PM

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!

correro 03-06-2003 09:04 PM

and, how do i access a windows share from a linux box?

scottpioso 03-06-2003 09:06 PM

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?

SparceMatrix 03-07-2003 12:51 AM

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.

correro 03-07-2003 01:00 AM

what is Swat?

i think i'll have to go to the HOWTO. groan

TexasDex 03-07-2003 02:03 AM

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.

SparceMatrix 03-07-2003 10:58 AM

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.

hsa 03-07-2003 11:00 AM

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.


All times are GMT -5. The time now is 09:43 PM.