Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-26-2007, 01:10 PM   #1
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Rep: Reputation: 15
user login script

Hello there.

I have a couple of internal drives (datastorage, music, backup) that I provided access to myself (user A) and another user (user B). Now there is a third user (user C) in the picture who desires access to my machine. However, I do not want user C to have access to my internal drives. I have configured fstab to mount my internal drives at startup.

Now, my problem is, how do I bar user C from seeing my internal drives.

I have included my fstab config file for reference:
/dev/scd0       /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/sdb1    /media/datastorage vfat defaults,umask=0000    0    0
/dev/sdb2    /media/music    vfat    defaults,umask=0000    0    0
/dev/sda3    /media/backup    vfat    defaults,umask=0000    0    0
Any help would be appreciated.
Old 08-26-2007, 01:54 PM   #2
LQ Guru
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
Create a group for accessing these partitions. Make users A & B members of the group. For an example, lets call it abaccess. Then incude the mount options "gid=abaccess,fmask=117,dmask=007". This will mount the vfat partitons with group ownership of abaccess. The directories will have rwxrwx--- access. User C, not being a member of the abaccess group won't be able to read any of the files, or even enter the diretories. The fmask and umask options are in place of your old umask entry.
Old 08-26-2007, 03:49 PM   #3
Registered: Jun 2004
Location: Calgary, AB, Canada
Distribution: Ubuntu 10.04
Posts: 57

Original Poster
Rep: Reputation: 15
Nice! Thanks Jschiwal.


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
Script run as user login or logout in Vsftpd server singhpps Linux - Software 4 11-27-2010 12:06 PM
Building a script to run after user login callingrohit Linux - General 4 04-26-2006 07:05 PM
User Login script? mkim Linux - Software 2 10-21-2005 06:13 PM
How to run a Script as root, after Login as User, in GDM MHOOO Red Hat 14 03-08-2005 09:41 AM
Running a script at user login? brucebearau Debian 1 01-19-2004 05:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:36 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration