LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 04-04-2006, 03:55 PM   #1
amon
Member
 
Registered: May 2004
Location: UK
Distribution: Debian, Ubantu, CentOS
Posts: 146

Rep: Reputation: 17
allow users to mount a samba file share only


I have just got ADS authentication to work. I'm running a AD 2003 domain server at the college where I work.

On my laptop I'm able to call:
Code:
sudo mount -t cifs -o username=<username> //mysvr01/user\$ mnt/H
This allows me to mount the network file storage drive that I use under windows to store files on.

I have made a script:
Code:
#!/bin/sh
#mount RIC Home drive to local file system.
if [ ! -r ~/Network ]; then # If the Network directory does not exist
                        mkdir ~/Network
fi
if [ ! -r ~/Network/Shared ]; then # If the Shared directory does not exist
                        mkdir ~/Network/Shared
fi
if [ ! -r ~/Network/H-${LOGNAME} ]; then # If the Home drive directory does not exist
                        mkdir ~/Network/H-${LOGNAME}
fi
sudo mount -t cifs -o username=${LOGNAME} //mysvr01/${LOGNAME}\$ ~/Network/H-${LOGNAME}
sudo mount -t cifs -o username=${LOGNAME} //mysvr01/shared ~/Network/Shared
This gives the users a Network directory in their linux home. This Network directory contains a 'H-<username>' and 'Shared' directory.

I have enabled users to mount and unmount by adding the following to /etc/sudoers
Code:
ALL     ALL = NOPASSWD: /bin/mount, /bin/umount
1: Is there a better/more linux way for doing this?

2: Can I avoid the users having to type in their passwods several times each time they log on to the system.

Last edited by amon; 04-05-2006 at 05:37 AM.
 
Old 04-05-2006, 09:41 AM   #2
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Although Novell SuSE based, their scripting suggestions are pretty good. As for whether something is more efficient, I'm trying to get my head round it too! For the moment, something like this is probably sufficient as it will also handle mounting additional shared drives based on group permissions of the user.
 
Old 04-05-2006, 01:35 PM   #3
amon
Member
 
Registered: May 2004
Location: UK
Distribution: Debian, Ubantu, CentOS
Posts: 146

Original Poster
Rep: Reputation: 17
my problem is to do this the users have to run a script and type in the AD passwords to mount the network drives. Is there a way round this?
 
Old 04-05-2006, 03:48 PM   #4
fouldsy
Senior Member
 
Registered: Jan 2002
Location: St Louis, MO
Distribution: Ubuntu
Posts: 1,284

Rep: Reputation: 47
Dammit, this is what I thought I'd included last time - http://www.novell.com/coolsolutions/appnote/14832.html :-)

I don't know how intense you want your setup to get - that idea uses an LDAP serer holding your user details which authenticates your clients and where the data is pulled from when accessing network shares.

Another alternative would be to setup Kerberos and ticketing so you actually authenticate against your AD, pulling the AD data and providing the various network shares based on your SID.

Failing that, a script that prompts for their password, and then mounts multiple drives bassed off that would work - a combination of the Novell scripts I suppose. How many users are you currently dealing with and how are they being authenticated on the network?
 
  


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
can't mount samba share and then write to the share calbazon Linux - Software 8 10-10-2010 02:35 AM
Samba share will not mount CloudBuilder Ubuntu 15 09-26-2007 05:15 PM
Samba users/share setup johncarr05 Linux - Software 2 02-01-2006 05:17 PM
Samba users/share setup johncarr05 Linux - Software 1 02-01-2006 04:50 PM
samba file share with windows users Peds222 Linux - Software 6 08-22-2003 01:07 PM


All times are GMT -5. The time now is 06:22 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration