LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-21-2005, 03:09 AM   #1
alamuru420123
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware 10.1
Posts: 29

Rep: Reputation: 15
Post (solved)Cannot share files using samba on slack 10.1


How do I share files over my LAN using samba? I want to share files so that anyone can access them from within the network using their linux or windows boxes. Previously, I would just set guest=ok and guest only=ok in Mandrake 10.1 and it would work. But in slack I just can't seem to get it to work. I can view the files in konqueror from my own box but from any other computer, it asks for the username and password. How do I get rid of this? I've tried everything. It shouldn't ask for the username and password from the hosts that i've allowed in the list. Here is my smb.conf file:

Quote:
# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2005/03/21 14:29:54

# Global parameters
[global]
wins support = Yes
hosts allow = 10.

[series]
path = /mnt/win_e/series/futurama
read list = 10.
guest ok = Yes

Last edited by alamuru420123; 03-21-2005 at 07:50 AM.
 
Old 03-21-2005, 06:23 AM   #2
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
In order to get *nix to mount a samba share without prompting for username, you have to mount it with "-o guest".


You seem to be missing a few options in your configuration... Here's my smb.conf from my fileserver (edited to protect the integrity of my network, yadda yadda)

Code:
[global]
workgroup = MyGroup
netbios name = MyServer
security = SHARE

[shared]
comment = Shared directory
path = /home/sambashare/shared
force user = sambashare
force group = users
read only = No
guest ok = Yes

[wwwroot]
comment = WWW Root Directories
path = /home/sambashare/wwwroot
force user = sambashare
force group = users
read only = No
guest ok = Yes
In my case, the server has a username, sambashare, and the shared and www directories are in its home directory. Apache is configured to serve up the virtual domains (and HT docs root) from subdirectories within ~sambashare/wwwroot, so all I have to do to edit a webpage is save it to the samba server, and it's live. I do most of my web development in Windows, because, while I use Firefox myself, I do still have to make sure that the content renders in exploder, so the integration is flawless.

The reason I've got force group and force user is so that I can SSH into the server and edit the webpages that way, too. If you want read/write capability, you're probably going to need to set it up like that.
 
Old 03-21-2005, 07:20 AM   #3
alamuru420123
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
Talking It works!

Hey Killerbob,

Thanks. Your suggestion worked. I just edited my smb.conf file to:

Quote:

# Samba config file created using SWAT
# from 127.0.0.1 (127.0.0.1)
# Date: 2005/03/21 18:41:12

# Global parameters
[global]
security = SHARE
workgroup=MANDAK
netbios name=Checknut

[series]
comment=Series
path = /mnt/win_e/series/futurama
guest ok = Yes
force user=abhiram
force group=users
read only=yes
Now it can be accessed from everywhere. Just one thing, here I'm using the user 'abhiram' which is the user name I use to login. Won't this give people other kinds of privileges on my computer? Can I make this a 'guest' account with just read capabilities? And also, why are we forcing the user name and group? I mean, u can ssh anyway right as long as you have ssh running. What does ssh have to do with this?
 
Old 03-21-2005, 07:35 AM   #4
alamuru420123
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
Thumbs up Ok it's done

here's my final smb.conf file:

Quote:

# Global parameters
[global]
security = SHARE
workgroup=MANDAK
netbios name=Checknut
server string="Welcome to Checknut"
hosts allow=10.

[Dragonball Z]
comment=Dragonball Z
path = /mnt/win_e/series/Dragonball Z
guest ok = Yes
read only=yes

[Futurama]
comment=Futurama
path=/mnt/win_e/series/futurama
guest ok=yes
read only=yes
It's working great. But could you just elaborate when we need to use the force user and force group option?
 
Old 03-21-2005, 08:45 AM   #5
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
I'm forcing the user/group, because my sambashare is served from /home/sambashare. "sambashare" is a legitimate username on my server, and I'm forcing the username/group to sambashare so that any files that are uploaded have the owner "sambashare.users".

It's necessary to force the user, because if I don't, then I get files in the directory that are created by "guest" (windows), or my unix username, depending on whatever system I'm logged in on, and who's logged in. By forcing the username to "sambashare", it ensures that all files are owned by the same username, irrelevant of which system they're logged in on.

IOW, it avoids ownership problems with editing and deleting files on the server. Since your share seems to be a Windows drive, I'm guessing that the filesystem is VFAT, in which case ownership isn't preserved anyway, and you don't need to worry about it.


BTW, why not just create a single share, /mnt/win_e/series in your case? That way, if you wanted Dragonball Z (I'm not even going into how bad that series is....), or Futurama, or Stargate, or whatever you have on your drive, they just have to mount the one folder, and change to a subdirectory? I'm keeping them separate on my system, because I want to have them at separate drive letters on my Windows share... wwwroot is Z: in Windows, and shared is N:. That way, there's no chance of accidentally editing the wrong version of a file, and there's no chance of accidentally publishing a file to the internet. If you're not serving up files to the internet, or you're just doing read-only, why not just have one mount point?
 
Old 03-21-2005, 10:27 AM   #6
alamuru420123
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
Well the filesystem is ntfs, so I don't think anyone can write to it in the first place. You mean to say that if I make a shared folder in the user say 'abhiram' then I'll have to use the force user and force group if I want to make the files uploaded accessible to that user. That's pretty cool. But, about 95 % of my hard disk is ntfs. My main requirement is to be able to share files from my windows partition on the network.

I used the two seperately because I want people who browse to know that I've put up both futurama and dragonball z (which is the greatest animation series ever lol) for share. If I put them both in series, people wouldn't know what I've shared at first sight. Anyway, this doesn't really cause any problems right?

Say one more thing. Suppose I want to share a particular folder for read-only access for a particular username and password, I can get that done using smbpasswd -a and specifying a password and then mentioning that user as the only valid user right?
 
Old 03-21-2005, 03:31 PM   #7
killerbob
Member
 
Registered: Oct 2004
Location: Ottawa, ON
Distribution: Slackware
Posts: 662

Rep: Reputation: 31
Quote:
Well the filesystem is ntfs, so I don't think anyone can write to it in the first place. You mean to say that if I make a shared folder in the user say 'abhiram' then I'll have to use the force user and force group if I want to make the files uploaded accessible to that user. That's pretty cool. But, about 95 % of my hard disk is ntfs. My main requirement is to be able to share files from my windows partition on the network.
Depends on the default file mask... It's 755 unless you've changed it, which means read/execute for users that don't own it, but no write. Depending on the permissions for the folder being shared, either users won't be able to upload at all, or they'll be able to upload files that can't be edited by the owner of the directory, but can be read and executed.

Quote:
Say one more thing. Suppose I want to share a particular folder for read-only access for a particular username and password, I can get that done using smbpasswd -a and specifying a password and then mentioning that user as the only valid user right?
Off the top of my head, I'm not entirely sure. I know it has to do with changing the security to USER instead of SHARE, but beyond that, I can't say. I knew at some point, but I've never used that kind of setting, and have since forgotten. Sorry

Quote:
dragonball z (which is the greatest animation series ever lol)
/derail

Bite your tongue.... no story, no dialogue, and the animation is questionable. I've watched a total of 3 episodes of that show: in two of them, they spent 25 minutes flipping back and forth between to characters grunting and every so often interjecting with "my power is increasing, and I will defeat you" or words to that effect, and in the third, the two idiots fought for a total of 45 seconds, and then it was all over. What kind of show needs to spend 1 hour grunting ("building up power") for 30 seconds of fighting?

Clearly, you've never seen Cowboy Bebop, Bubblegum Crisis, Robotech, or hell, even Sailor Moon Super S was better'n DBZ (bear in mind that the version of that show that made it to America was R, the version for girls, and was heavily edited... in the original storyline, there were 9 of them, including a transvestite, a lesbian couple, and one who was *very* promiscuous). The original Dragon Ball, however, actually had a story and humour....


/derail off. Sorry folks, I feel better now. Back to Linux geek mode, instead of Anime geek.
 
Old 03-22-2005, 02:18 AM   #8
alamuru420123
LQ Newbie
 
Registered: Feb 2005
Distribution: Slackware 10.1
Posts: 29

Original Poster
Rep: Reputation: 15
Thanks a lot bob. I guess i'll play around a bit with this thing. It's not something i need immediatly, but i might require it. Thanks for taking your time to reply. This is my first thread in linuxquestions that actually got solved.

Now, about Dragonball Z , What you said is actually right. lol. Yup, they do more of power building than actual fighting. And they constantly take breaks in between fights to psyche each other out by yakking their brains out. But, I just don't know why I like it. Maybe it's the determination that is portrayed in the characters, well, I just don't know. I did watch some anime before. When I was a kid, I watched Voltron (is that anime? i'm not sure) and then robotech (awesome, but i don't know if i can get it now) and a short tryst with ninku (The philosophy in the series is crappy. It doesn't make sense at all). I know the original Dragonball was better but I can't seem to get that either . So for now, IMO, Dragonball Z ROCKS! If you want to take this debate further, we better find another forum, or just drop me a mail. lol.

Thanks for helping out.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Cannot create files on samba share jhoderd Linux - Software 2 01-04-2005 08:46 AM
updating existing files on Samba share SteveGodfrey Linux - Software 0 09-20-2004 11:49 AM
can't create/modify files in a samba share deadslota Linux - Newbie 4 08-07-2004 10:26 PM
Don't share .files with Samba objorkum Linux - Software 1 02-28-2004 07:48 AM
How could i hide some files in the share directory(samba) whepin Linux - General 1 12-20-2001 07:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

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

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