Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Security > Securing Samba, Freecom network drive works when it shouldn't?

Forgot Password?
 Linux Security   Discussion about keeping your machines secure, and the crackers out.

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Reply
 
Thread Tools Display Modes
Old 08-08-2009   #1 (permalink)
Linux Engineer
 
Freston's Avatar
 
Join Date: Mar 2007
Location: The Netherlands
Posts: 827
Securing Samba, Freecom network drive works when it shouldn't?

I'm confused about my network drive.

I've got a Freecom 400GB network drive, with build in FTP and SMB server. I'm not very experienced when it comes to Samba. And I'm not very experienced with network drives. At least I thought I knew how they work but it turns out I don't

Well, here's the deal. I have this network drive connected to my network via a switch, to which my other machines are connected as well. The drive is setup to request DHCP from my server, and the server is configured to hand out all info and assign DNS and all.

Now I take a random computer, login as root, et voila! I can mount the network drive and do all sorts of arbitrary stuff to it. I have not edited smb.conf, I have not setup anything, I use an invalid username and an invalid password. As long as I am root, the thing accepts everything I throw at it.

If I run this command (literal copy/paste from Konsole) :
Code:
# hebnix is the DNS name for the drive.
mount -t smbfs -o username=foo,passwd=bar //hebnix/data /mnt/samba/data
And I have read/write access to the drive.

This should not be

From a security perspective this is terrible. Anyone with a *nix box on my network can mount the share using a completely invalid random username and password. What I want, is that the drive respects user permissions.
Also, as the drive is FAT32, at least I think that is the cause, I cannot change file ownership on the disk, and it doesn't respect my (tight) umask. All files are rwxr-xr-x, and all I can do as far as I can see is toggle the 'write' flag. 'read' and 'execute' seem mandatory. But this may be due to FAT32. Hmmm?

I would be really helped if someone (you? ) is able to tell me how I can make the drive respect file ownership/permissions and also do what under NFS is called root_squash.
__________________
Can't tell an OS by it's GUI
Freston is offline  


Reply With Quote
Old 08-15-2009   #2 (permalink)
Just Joined!
 
Join Date: Jul 2009
Location: Delhi
Posts: 27
use testparm

send output of
root#testparm -v

thnks
vishesh is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 11:45 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2