LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Samba configuration (https://www.linuxquestions.org/questions/linux-newbie-8/samba-configuration-847847/)

Jyothi.yis 12-02-2010 01:03 AM

Samba configuration
 
hi,

i have configured samba in my linux system which is running on redhat 4.2. I can able to see the folders in Windows Xp Professional system and i have the permission to access it. But at the same time if try to access Windows folders in linux system, it throws an error like You do not the permission necessary to view the contents of "Windows Network:computer name".

may i know why it is happening like this?

leep01 12-02-2010 07:25 AM

Hi

When I setup a few Samba test systems I found I had issues with selinux interfering with Samba, I do not get to the bottom of the issue but found if I disabled selinux with the command "setenforce 0" my connections between windows and my samba server worked.

Give it a try and see if it is related, you can re-enable selinux with the command "setenforce 1"

If that does not work can you post your /etc/samba/smb.conf file?

I hope this helps

Jyothi.yis 12-03-2010 02:16 AM

Following is the smb.conf file:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2010/12/03 11:15:19

# Global parameters
[global]
server string = Samba Server
log file = /var/log/samba/%m.log
max log size = 50
socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
dns proxy = No
wins support = Yes
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
cups options = raw

[homes]
comment = Home Directories
path = /bacups/database
invalid users = nobody
read only = No
hosts allow = 200.168.1.

[printers]
comment = All Printers
path = /var/spool/samba
printable = Yes
browseable = No


I also tried "setenforce 0" but no use. Still i am getting same error. I have tried to configure samba both from smb.conf and swat. But i didn't get the result out of it. Is there anything to configure in Windows XP system?

raviteja_s 12-05-2010 02:03 AM

Samba Client - Windows
Map Drive Samba Drive

* Right click - "My Network Places"
* Select "Map Network Drive"
* In the dialog box provide

Drive : Z:
Folder : \\192.168.0.253\bacups\database

It opens authentication dialogbox, where
username : user1
password : ****
* Open "Windows Explorer" to find Z: drive mapped to
Linux shared folder.


i hope this is helpful..............

Jyothi.yis 12-06-2010 04:06 AM

hi,

Thanks, this works. But i am getting error while i try to access folders from linux system. the error is :- you do not have permission necessary to view the contents of Windows network:machine_name.
If i try to access from CLI, it is displaying the shared files of the Windows machine. The issue is while i tried to access it through GUI.
the command is :
# smbclient -L <hostname of Windows/linux machine> -U <username>
For example:

[root@yis samba]# smbclient -L orange -U Tally
Password:
Domain=[ORANGE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

Sharename Type Comment
--------- ---- -------
BrotherH Printer Brother HL-1070
IPC$ IPC Remote IPC
print$ Disk Printer Drivers
SharedDocs Disk
yis123 Printer \\Yis\yis123
HPOffice Printer HP OfficeJet G95
testing Disk
folder1 Disk
New Folder Disk
folder2 Disk
Printer2 Printer Canon Bubble-Jet BJ-130
ADMIN$ Disk Remote Admin
C$ Disk Default share
Domain=[ORANGE] OS=[Windows 5.1] Server=[Windows 2000 LAN Manager]

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

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

overlook 12-06-2010 09:25 AM

Let me guess - you're trying to access the share from Nautilus? If that's the case then the problem is Gnome lacks the ability to store username/password credentials for samba shares (which would allow you to write). You can however browse shares as read-only in the GUI. KDE sort-of works, and can store usernames and passwords which allows you to copy files to shares but in my experience it's buggy and I've had problems with deleting files.

If you're ok with read-only access then try adding "guest ok", like so:
Quote:

[homes]
comment = Home Directories
path = /bacups/database
invalid users = nobody
read only = No
hosts allow = 200.168.1.
guest ok = Yes
and it should work for read-only. The most stable solution I've found so far is to simply mount the share at the CLI:
Quote:

mount.smbfs //<IP Address>/path/of/share /path/for/mountpoint -o username=<username>,password=<pass>,uid=1000,mask=000
But it's annoying to do this every time, so you can look into mounting the samba share through /etc/fstab. I don't do this myself so unfortunately I don't have an example readily available.

overlook 12-06-2010 09:26 AM

Sorry, somehow I managed to double-post.

Jyothi.yis 12-07-2010 08:55 PM

hi,
the problem got solved. I simply mounted the windows shared folder in linux
smbmount //Windows_computername/shared_folder /linux_mountpoint -o username
ex: smbmount //Orange/folder1 /mnt/windocs -o administrator
password:

To check whether the folder has been mounted or not use the command df -h
Now open file browser(nautilus) and specify smb:///Orange/folder1. This will ask you to enter the username and password of Windows system. Type in the username and password, you are ready to access windows shared folders now.


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