LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   SAMBA Problem (https://www.linuxquestions.org/questions/linux-networking-3/samba-problem-670600/)

jhaxxar 09-17-2008 01:57 PM

SAMBA Problem
 
I am attempting to setup Samba on my RHEL4 system for access by my WinXP systems. I can see the shares on my WinXP system, but when I attempt to access a share, a username/password box pops up. The username is already filled in with Software\guest and requests a password. I have no idea what password it is requiring.

I am a novice to Linux, so any help would be Appreciated. I can supply screen shots from the WinXP side if it will help along with my smb.conf file.

TB0ne 09-17-2008 02:29 PM

Quote:

Originally Posted by jhaxxar (Post 3283473)
I am attempting to setup Samba on my RHEL4 system for access by my WinXP systems. I can see the shares on my WinXP system, but when I attempt to access a share, a username/password box pops up. The username is already filled in with Software\guest and requests a password. I have no idea what password it is requiring.

I am a novice to Linux, so any help would be Appreciated. I can supply screen shots from the WinXP side if it will help along with my smb.conf file.

It's asking for a user ID/password on your Linux system. Windows is populating it with whatever it thinks is right.

Unknown_User 09-17-2008 02:35 PM

Have you added the names of the users that you want to access the share(s) to the smbusers file and set passwords using smbpasswd?

jhaxxar 09-17-2008 02:59 PM

The username is already filled in and is greyed out. The username is software\guest.

Right now I only have me as a user.

Unknown_User 09-17-2008 03:25 PM

My apologies if I'm misunderstanding you here but when you try to access your samba share from XP samba replies with "who are you and what's your password?" hence the dialogue box.

It then checks the provided information against it's list of users and passwords.

If you haven't supplied samba with any usernames and passwords then only 'guest' exists without sufficient permissions to see the contents of the shares.

You could set a password for 'guest' using smbpasswd but it's not wise to use that account as it is an obvious one to attack if you are in an environment where that could happen.

Try creating a user on the Linux machine by editing the smbusers file and then setting a password for that user (using smbpasswd). You should then be able to access the share from Windows by typing in the username and password in the dialogue box when it appears.

jhaxxar 09-18-2008 08:49 AM

Still having problems

My smb.conf file is

[global]

workgroup = workgroup
server string = Samba Server
encrypt passwords = yes
username map = /etc/samba/smbusers

[homes]
comment = Home Directories
browseable = no
writeable = yes

[root]
path = /root
writeable = yes
guest ok = yes

[Software1]
comment = Software Dept Server
path = /software1
writeable = yes
guest ok = yes

My smbusers file

# Unix_name = SMB_name1 SMB_name2 ...
root = administrator admin
nobody = guest pcguest smbguest
adm = jdonaldson
jdonaldson = jdonaldson


My smbpasswd file

jdonaldson:500:73AB.......................


When I access the system from my WinXP system I see both the Home and Software1 shares. When I click on the Software1 share a username/password box pops up. The Username part is greyed out and says Software\guest. The password box is writeable.

It should have come up and allowed to put user "jdonaldson".

So what am I doing wrong?

Unknown_User 09-18-2008 04:57 PM

When Windows talks to samba it uses the its username and password to try to log in to the share.

If the username and password don't match then, after three attempt (that you don't see) samba will default to the guest account and the dialogue box greys out.

You could ensure that your Windows username and password match the samba settings or change your smb.conf to add a share along the lines of;

[Jhaxxars share]
path = /media/Storage/Jhaxxars Share
browesable = yes
writable = yes
guest ok = no
username = yourusername
only user = yes

or if you want a public share that anyone can get into without a username and password then edit smb.conf to something like;

[global]
workgroup = workgroup
netbios name = whatever-server
server string = Samba Server
interfaces = eth0, lo
auth methods = guest
map to guest = Bad User
hosts allow = 192.168.1., 127.0.0.1

[shared]
comment = Shared
path = /pub
write list = nobody, guest
read only = No
guest ok = Yes

billymayday 09-18-2008 06:26 PM

How are you trying to connect to the share drive? If you are doing it from explorer (ie with "map network drive"), there should be a check box in the browse/enter share name screen to logon or connect as a different user. Click on that to allow modifying the username.

jhaxxar 09-19-2008 09:31 AM

Unknown_User..... thank you for the tip. It allows me to logon now. Since I am not super adapt at Samba or Linux in general, I created a user called "software". Added it as a Samba user. This way each person in the lab can logon to it, access the folders, and etc. Crude...yes, but works.


All times are GMT -5. The time now is 09:19 AM.