Mounting a shared folder in everyone's home directory

David Groos djgroos at gmail.com
Thu Apr 29 14:44:52 BST 2010


Got it!  Thanks for your help, Simon.  Here were the steps, feel free to
edit/improve/annotate them as useful--I'll be making a simple wiki page on
this.

1.  sudo apt-get install smbfs
2.  Make folder on my desktop, named it, "dogimages" (not sure if must be
lower case)
3.  Right-clicked and selected Sharing Options, selected, Share this folder
and Guest access. (little flag appears on folder--I'm using Jaunty).
4.  Make the mount point-- sudo mkdir /media/dogimages (Directory name must
be all lowercase, it seems)
5.  sudo mount -t cifs -o guest //localhost/dogimages /media/dogimages
6  And a sharepoint mounted on my desktop! (is it called, 'sharepoint'?  I
was looking for a word to distinguish it from the folder created in step 2)
7. I added an image to the shared folder that I had created in step 2 and
the image appeared in the mounted sharepoint :)

This is great.  Thanks for the detailed info.

My next step (I'm not in a rush to do this) is that I will want to be able
to fine tune on whose desktop this shows up.  I want to be able to manage
this by group membership.  In other words I've got a group on my server
called, "period2".  I want to similarly mount a shared folder on the desktop
of just members of that group.  Is it very complex task?

David

On Tue, Apr 27, 2010 at 5:36 PM, David Groos <djgroos at gmail.com> wrote:

> Thanks for all this info!  I'll give this a go again when I get to school
> tomorrow AM.
> David
>
>
> On Apr 27, 2010, at 4:51 PM, Simón Ruiz wrote:
>
>  On Tue, Apr 27, 2010 at 4:39 PM, David Groos <djgroos at gmail.com> wrote:
>>
>>> Hi Simon,
>>>
>>>  I'm beginning to believe you're using LTSP?
>>>>
>>>
>>> Yes.
>>>
>>
>> Ah! Makes so much more sense, now. :-)
>>
>> At our school every user is on their own workstation, authenticating
>> logins off a Samba server and mounting their home folders and shared
>> folders off another Samba server.
>>
>> We can't manipulate student's home folders because they're created
>> from scratch at login, and students seldom log into the same computer
>> twice, so we mount Samba servers dynamically on login and unmount them
>> on logout.
>>
>>  Here's my idea/suggestion, leaving in step 2, forgetting about
>>>> Symlinks, and moving forward from there (I'm also checking the "Guest
>>>> access" checkbox when I create the share on my Desktop.):
>>>>
>>>
>>> I don't understand why you are checking the "Guest access" checkbox when
>>> you
>>> create the share on your desk because as I understand it in the next step
>>> you are creating the folder to be shared.
>>>
>>
>> I am checking the "Guest access" checkbox so that later when we mount
>> it (particularly if we want to mount it automatically after reboots in
>> the future), we can specify that we're mounting as "guest" and not
>> have to bother with logging in. If that's not checked, we'll need to
>> log in as a specific, valid, local user when we mount it.
>>
>> I do this because that information is intended to be easily accessible
>> to all; I would *not* make it "Guest access" if it was important for
>> people who *didn't* have a local account *not* to have access to it.
>>
>> That's the "side-effect", here: now anyone can mosey on over to your
>> computer, see that you are sharing something called "Dogs", and look
>> through it. I figure, if anything, this is a good thing.
>>
>>  3. "sudo mkdir /media/Dogs" - Create a folder to use as a mountpoint
>>>> in the /media directory
>>>>
>>>
>>> Did this and it worked fine.
>>>
>>
>> Actually, here I'm not creating the folder to be shared, I'm creating
>> the mount point; that is, the local place (USUALLY an empty folder)
>> where the "remote" share's contents will appear.
>>
>> The folder to be shared, the place you actually want to put the files
>> you're sharing, is still /home/your_username/Desktop/DogTraits
>>
>>  4. "sudo mount -t cifs -o guest //localhost/Dogs /media/shared" -
>>>> Mounts the Samba share (using your loopback device; this won't slow
>>>> down networking at all) to the folder "/media/Dogs"
>>>>
>>>
>> First of all, I mis-spoke in the above sentence, it was *meant* to
>> say: Mounts the Samba share "//localhost/Dogs" to the folder
>> "/media/shared"
>>
>>  Did this and got the following output: http://pastebin.com/JPf22tCi so
>>> looks
>>> like it didn't work.  Any ideas?  I've got no immediate deadline but need
>>> to
>>> solve this.  Also, I'd really like to set up an edubuntu wiki page about
>>> 'file sharing schemes for teachers' or something.  Any help on
>>> naming/locating that page would be helpful.
>>>
>>
>> I can see the primary issue below:
>>
>> mrg at gcos2:~$ sudo sudo mount -t cifs -o guest//localhost/DogImages
>> /media/shared
>>
>> You didn't place a space between the word "guest" and the first "/" of
>> "//localhost/DogImages". Mount is trying to figure out what the option
>> "guest//localhost/DogImages" is. ;-)
>>
>> The next problem would be that you're trying to mount the "remote"
>> share to "/media/shared"; replace "/media/shared" here with
>> "/media/DogImages", as that's the empty folder you just created.
>>
>> The next thing I see that *might* be a problem, unless you've changed
>> something, is that you're trying to mount "//localhost/DogImages" when
>> before you mentioned that you named the share "Dogs". Replace this
>> with "//localhost/Dogs" if that's still true.
>>
>> So: sudo mount -t cifs -o guest //localhost/SHARE_NAME
>> /media/EMPTY_MOUNTPOINT_FOLDER_NAME
>>
>> Becomes: sudo mount -t cifs -o guest //localhost/Dogs /media/DogImages
>>
>> Based on the info you've given us so far.
>>
>> Let me know if that's any better/clearer. :-)
>>
>>  Thanks
>>> David
>>>
>>
>> P.S. And, just in case it comes up: you might need to "sudo apt-get
>> install smbfs" before this works; I don't recall exactly.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: https://lists.ubuntu.com/archives/ubuntu-education/attachments/20100429/d53b3971/attachment-0001.htm 


More information about the ubuntu-education mailing list