LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-02-2010, 01:03 AM   #1
Jyothi.yis
LQ Newbie
 
Registered: May 2010
Posts: 12

Rep: Reputation: 1
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?
 
Old 12-02-2010, 07:25 AM   #2
leep01
LQ Newbie
 
Registered: Nov 2010
Posts: 3

Rep: Reputation: 1
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
 
Old 12-03-2010, 02:16 AM   #3
Jyothi.yis
LQ Newbie
 
Registered: May 2010
Posts: 12

Original Poster
Rep: Reputation: 1
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?
 
Old 12-05-2010, 02:03 AM   #4
raviteja_s
Member
 
Registered: Jun 2010
Location: India
Distribution: Redhat
Posts: 68

Rep: Reputation: 1
Smile

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..............

Last edited by raviteja_s; 12-05-2010 at 07:10 AM.
 
Old 12-06-2010, 04:06 AM   #5
Jyothi.yis
LQ Newbie
 
Registered: May 2010
Posts: 12

Original Poster
Rep: Reputation: 1
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
--------- -------
 
Old 12-06-2010, 09:25 AM   #6
overlook
LQ Newbie
 
Registered: May 2006
Location: Sweden
Distribution: Custom
Posts: 12

Rep: Reputation: 1
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.
 
Old 12-06-2010, 09:26 AM   #7
overlook
LQ Newbie
 
Registered: May 2006
Location: Sweden
Distribution: Custom
Posts: 12

Rep: Reputation: 1
Sorry, somehow I managed to double-post.

Last edited by overlook; 12-06-2010 at 09:31 AM. Reason: double-post
 
Old 12-07-2010, 08:55 PM   #8
Jyothi.yis
LQ Newbie
 
Registered: May 2010
Posts: 12

Original Poster
Rep: Reputation: 1
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.
 
  


Reply



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



Similar Threads
Thread Thread Starter Forum Replies Last Post
samba configuration Steviepower Linux - Server 12 12-20-2010 02:54 AM
Samba configuration itd_pac Linux - Networking 2 04-25-2006 09:25 PM
Samba Configuration EzehM Linux - Networking 6 06-24-2004 02:46 PM
Samba configuration littlegreenman Linux - Networking 14 09-10-2003 11:55 AM
Samba configuration cyrilbritto Linux - Networking 3 09-02-2003 08:43 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:44 AM.

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
Open Source Consulting | Domain Registration