LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (http://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Can't access the samba server (RedHat9) frm WinXP though it's shown in network places (http://www.linuxquestions.org/questions/linux-networking-3/cant-access-the-samba-server-redhat9-frm-winxp-though-its-shown-in-network-places-515546/)

rajibshovan 01-02-2007 05:19 AM

Can't access the samba server (RedHat9) frm WinXP though it's shown in network places
 
My samba server can access the winXP client but client can't access the server. Samba server is shown in my workgroup 'support'...when trying to access, it shows the following message:
\\officepc2 is not accessible.you might not have permission to use this network resource.......bla..bla..network path was not found.
N.B: my client is a winxp pc and server is RedHat 9

here is my smb.conf :

[global]
workgroup = support
netbios name = officepc2
server string = samba_server
log file = /var/log/samba/%m.log
dns proxy = no
guest account = rajib
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
password server = None
guest ok = yes
printcap name = /etc/printcap
security = user
encrypt passwords = yes
smb passwd file = /etc/samba/smbpasswd
username maps = /etc/samba/smbusers
max log size = 0
hosts deny = ALL
hosts allow = 127.0.0.1 192.168.2.

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


# NOTE: If you have a BSD-style print system there is no need to
# specifically define each individual printer
[printers]
comment = All Printers
browseable = no
printable = yes
path = /var/spool/samba

[root]
comment = root user
valid users = rajib
writable = yes
create mode = 0765
path = /
allow hosts = 192.168.2.191 127.

[rajib]
path = /home/rajib
writable = yes
guest ok = yes

I'm struggling with it.. :confused:
sorry for the long message..
Any kind of suggestion is heartly welcome.... :)

DiBosco 01-02-2007 05:49 AM

Have you added accounts for the XP machine using adduser and smbpasswd?

Au_Squirrel 01-02-2007 08:53 AM

Have you tried using the net command in Windows?

Can you access the shares using the smbclient on the linux box?

I would recommend that you have a read of the SAMBA Trouble shooting guide at http://samba.org/samba/docs/man/Samb...eshooting.html

Regards

rajibshovan 01-04-2007 05:02 AM

Dear DiBosco,
I didn't know that I've to configure my XP client...then following ur post,I've tried with that....to use adduser and smbpasswd in my XP, I installed
http://smithii.com/files/samba-3.0.23c-ross.zip.....then followed the follwing steps:

Unzip to "C:\Progra~1". For example:

unzip -o -d "C:\Progra~1" samba-3.0.23c-ross.zip

3. Add the following to your system path:

C:\Progra~1\samba\bin;C:\Progra~1\samba\sbin

4. Open a Command Prompt window:

Start / Run / CMD [Enter]

5. Change to the samba directory:

cd /d C:\Progra~1\samba

6. If Cygwin is installed, skip to step 7. Otherwise, run:

smbsetup.cmd

Go to step 9.

7. If c:\cygwin\bin is in your path, you will need to delete the
Cygwin dll files in C:\Progra~1\samba\bin, by typing:

del bin\cyg*.dll

8 Run cygsetup.cmd:

cygsetup.cmd

9. Reboot computer:

shutdown -r -t 0 -c "Let's samba!"

After rebooting...

10. Open a Command Prompt window:

Start / Run / CMD [Enter]

11. Run daemons:

cd /d C:\Progra~1\samba
start_daemons.cmd

12. Test Samba locally:

smbclient -L localhost -U guest%password

You should see:

Domain=[hostname] OS=[Unix] Server=[Samba 3.0.23]

Sharename Type Comment
--------- ---- -------
tmp Disk /cygdrive/c/windows/temp
IPC$ IPC IPC Service (Samba Server)
Guest Disk Home Directories
Domain=[hostname] OS=[Unix] Server=[Samba 3.0.23]

Server Comment
--------- -------

Workgroup Master
--------- -------

13. Test Samba from another Windows computer:

net use * \\1.2.3.4\tmp /user:guest password

Substitute your hostname or ip address for 1.2.3.4.
You should see:

Drive Z: is now connected to \\1.2.3.4\tmp.

14. Change the default passwords:

smbpasswd guest
smbpasswd administrator

15. If you add or remove users, you should run the mkpasswds.cmd command:

cd /d C:\Progra~1\samba
mkpasswds.cmd


But now my Unix Samba server is not in XP's network places...when removing the
config for XP, it's again in the network place...& can't access also...

I'm stumped...what should I try more???? plz help...

rajibshovan 01-04-2007 05:26 AM

Dear Squirrel,

will u specify plz.....
1) how can I try to access the samba server using net command in windows??
I used net usecommand...but failed...

2) how can I acces the windows shares using smbclient on linux??
(I can manually browse windows shares in gui environment on linux)

plz help....

DiBosco 01-04-2007 09:58 AM

No, for the XP machine not on it!

You have to add user accounts on the Linux box so the Windows machine can access the Linux machine...

rajibshovan 01-04-2007 10:51 PM

Dear DiBosco,

yeh...I've added that early...but no work

Au_Squirrel 01-05-2007 09:40 AM

rajibshovan,
The command for windows should be "net use H: \\office2pc\rajib". This should map the computers H: drive to your rajib share. You should also be able to enter "net view \\office2pc" and you sould get back a list of all the visible shares on \\office2pc.

Here is the relevant section of the guide in procedure 38.1 with minor edits for clarity.

From the command prompt in a shell type "smbclient //"your servername"/"your share name". You should then be prompted for a password. You should use the password of the account with which you are logged into the UNIX box.
Note: If you are running this from an su or root account :tisk: (not recommended), it will as you for the smb password you have set for the linux logon.

eg: Linux account "user1" has been created and the linux password was set to "MyLinuxPassw0rd" then the user has also been added with the command "smbpasswd -a user1" with the password was set to "MyWinPassw0rd"

At the password prompt that appears after you have entered the smb command, enter the MyWinPassw0rd"

If you want to test with another account, then add the -U accountname option to the end of the command line for example, smbclient //bigserver/tmp -Ujohndoe.
Note: It is possible to specify the password along with the username as follows: smbclient //bigserver/tmp -Ujohndoe%secret.

Once you enter the password, you should get the smb> prompt. If you do not, then look at the error message. If it says “invalid network name,” then the service tmp is not correctly set up in your smb.conf.

If it says “bad password,” then the likely causes are:

1.

You have shadow passwords (or some other password system) but didn't compile in support for them in smbd.
2.

Your valid users configuration is incorrect.
3.

You have a mixed-case password and you haven't enabled the password level option at a high enough level.
4.

The path line in smb.conf is incorrect. Check it with testparm.
5.

You enabled password encryption but didn't map UNIX to Samba users. Run smbpasswd -a username

Once connected, you should be able to use the commands dir, get, put, and so on. Type help command for instructions. You should especially check that the amount of free disk space shown is correct when you type dir.

Now this will check that your samba shares are available.

If this works on you samba server, you may have a network or fire wall problem. In earlier parts of the guide, it will talk you through how to test those.

Also, are you running selinux on the server?

rajibshovan 01-06-2007 09:01 AM

Dear Squirrel

1) smbclient //officepc2/root worked quite well...and I got the smb> prompt

2) but net use * \\officepc2\root or net view \\officepc2 did not work.
Error msg is network path was not found..

I didn't find how to share the directory in my RedHat 9.0 (graphically or using cmd)...sorry for this silly prob..but I did n't..

plz.....help

rajibshovan 01-06-2007 09:04 AM

oh Thanx for ur long mail

Au_Squirrel 01-06-2007 09:40 AM

I am assuming that you ran the net commands from an XP command prompt on your XP box. Not on the linux box.

At the smb> prompt, could you list the directory? From the sounds of it, your samba server is working but your windows boxes cannot resolve your servers netbios name. This sounds as if you have a basic network/firewall problem.

Also, are the clients win XP home or win XP Pro?

Follow the troubleshooting guide and test your basic network connectivity and let me know how you went.

Regards

rajibshovan 01-08-2007 05:20 AM

yeh, at the smb> prompt, i can list the directory...
Your assumption is right...
Samba server is running but my XP (Pro) client can't resolve my servers...
Thanx.......


All times are GMT -5. The time now is 07:11 PM.