LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-26-2007, 10:29 PM   #1
Ulfgar
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Rep: Reputation: 0
Automount Shares on Login


Im trying to set up a linux laptop in my school on a domain. Student logins and directories are saved on the server. I have set up access to the logins on the linux laptop, but now I need to figure out how to have student folders automounted at startup. The folder is named the same as the login, so for example Bob Smith's logon and folder would be Bob.Smith (FirstName.LastName), withing a folder called "Students" on the Windows Server. I know how to mount folders, but need help automounting a unique folder for each individual logging in. There are about 150 logins, so doing it manually is not gonna work. I was thinking a script would be the way to go, but maybe not.

I am using Suse 10.2 with KDE if that helps at all

Any ideas?
 
Old 03-26-2007, 10:55 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
... the script needs to parse $USER into the appropriate mount target name, then run the mount command. You want to invoke the script from the users login script.

Of course, the quick hack would be to add a launcher on the desktop to do this.

Is it that you want the students home directories to be obtained from the server and not get stored on your laptop?
 
Old 03-27-2007, 02:09 AM   #3
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
don't mount on login, mount on access. check out automount / autofs which is presumably installed on the clients already.
 
Old 03-27-2007, 08:24 AM   #4
Ulfgar
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
"Is it that you want the students home directories to be obtained from the server and not get stored on your laptop"

Yes. The students need full read/write access so everything they save can be on their folder on the server, rather than just on the laptop. Basically this windows share has the files they need to access from any laptop in the school, windows or linux. Nothing saved locally on one laptop
 
Old 03-28-2007, 10:18 PM   #5
Ulfgar
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Any ideas??

Sorry if it seems like Im rushing this, but the tech person will be at the school tomorrow, and Im trying to get help with this so I can talk to him about it. I will need help making the actual script, more than just suggestions I think, because I know basically nothing about creating scripts

Last edited by Ulfgar; 03-28-2007 at 10:28 PM.
 
Old 03-29-2007, 05:04 AM   #6
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
You have been supplied with ideas - see posts #2 and #3.
 
Old 04-30-2007, 10:56 AM   #7
Ulfgar
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Hello,
I got the script to work, but I still have 2 small problems, more annoying than anything.
1. The script requires both the root password to use the "mount -t cifs" as well as

2.the password of the user currently logged in (because the share requires it for access.)

Is there a way to avoid having the user enter these? (because the script is in the autostart folder, and im actually trying to make it so the user doesnt see or have to interact with it at all)

the script looks something like this (although I didnt actually make the script myself, and therefore dont really know how exactly to modify it.)

echo $LOGNAME
DOMAIN=${LOGNAME%\\*}
USER=${LOGNAME/*\\}
mount -t cifs //server/share /mountpoint

As for the root password im not sure what to do. Is there a way I can make the mount command accessible for any user regardless of group or individual permissions. I really dont what to bother with sudo or permissions. (And right now normal users using the mount command is not at all a concern for me.)

Thanks for any help you can give me. Sorry for the long rant.

Last edited by Ulfgar; 04-30-2007 at 12:26 PM.
 
Old 05-08-2007, 09:30 PM   #8
Ulfgar
LQ Newbie
 
Registered: Mar 2007
Posts: 8

Original Poster
Rep: Reputation: 0
Still need help with this latest post, thanks
 
  


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
Login scripts for windows shares gymim Linux - Networking 1 10-29-2004 04:06 PM
Automatic mapping of Samba shares at login on Fedora chaan Linux - Software 2 05-14-2004 11:43 AM
auto mount shares before login Archer12 Linux - Networking 2 01-13-2004 07:05 PM
Mounting Samba shares and Samba Share Login time112852 Linux - Software 1 09-14-2003 02:23 PM
How to automount my C drive (FAT32) every time I login Redhat futurist Linux - General 2 03-17-2003 02:17 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:26 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