Mounting a shared folder in everyone's home directory

David Groos djgroos at gmail.com
Tue Apr 27 23:36:20 BST 2010


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.




More information about the ubuntu-education mailing list