Networking Forums

Networking Forums > Computer Networking > Linux Networking > Mapping users on mount

Reply
Thread Tools Display Modes

Mapping users on mount

 
 
Captain Dondo
Guest
Posts: n/a

 
      09-29-2005, 07:05 PM
I need to be able to 'map' an ordinary user to root...

Here's the scenario:

I am developing for an embedded platform. On my development box, I work
as an ordinary user. As I compile stuff, I place it into a ~/boot
directory.

The ~/boot dir is nfsmounted by the embedded SBC as its root fs.

The problem is that the files in ~/boot are owned by
ordinary_userrdinary_user, and nfsmounted as being owned by user
1001:1001. This wreaks all sorts of havoc when the embedded system
wants to boot.

I could change the files in ~/boot to be all owned by root, but that is
a major PITA, since I'd have to be root to make changes to the fs.

I could do development as root, which is probably a "really bad
idea"(tm). :-)

Or I could figure out some way to get nfs to 'map' user 1001:1001 to
user 0:0 when it mounts the root fs.

ISTR I could do that at one time, but I can't figure out how....

Thanks....
 
Reply With Quote
 
 
 
 
Damion de Soto
Guest
Posts: n/a

 
      09-30-2005, 12:28 AM
Captain Dondo wrote:
> I need to be able to 'map' an ordinary user to root...
>
> Here's the scenario:
>
> I am developing for an embedded platform. On my development box, I work
> as an ordinary user. As I compile stuff, I place it into a ~/boot
> directory.
>
> The ~/boot dir is nfsmounted by the embedded SBC as its root fs.
>
> The problem is that the files in ~/boot are owned by
> ordinary_userrdinary_user, and nfsmounted as being owned by user
> 1001:1001. This wreaks all sorts of havoc when the embedded system
> wants to boot.
>
> I could change the files in ~/boot to be all owned by root, but that is
> a major PITA, since I'd have to be root to make changes to the fs.
>
> I could do development as root, which is probably a "really bad
> idea"(tm). :-)
>
> Or I could figure out some way to get nfs to 'map' user 1001:1001 to
> user 0:0 when it mounts the root fs.
>
> ISTR I could do that at one time, but I can't figure out how....

The 'exports' (5) man page shows the options to do it:

all_squash
Map all uids and gids to the anonymous user. Useful for NFS-exported public FTP
directories, news spool directories, etc. The opposite option is no_all_squash,
which is the default setting.

anonuid and anongid
These options explicitly set the uid and gid of the anonymous account. This option
is primarily useful for PC/NFS clients, where you might want all requests appear to
be from one user. As an example, consider the export entry for /home/joe in the
example section below, which maps all requests to uid 150 (which is supposedly that
of user joe).

use all_squash, and set the anonuid and anongid to root.
(unless NFS has some built-in security features to prevent you doing this)

Regards,


--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
Damion de Soto - Software Engineer email: (E-Mail Removed)
CyberGuard Corporation ---- ph: +61 7 3435 2809
| Custom Embedded Solutions fax: +61 7 3891 3630
| and Security Appliances web: http://www.cyberguard.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~
---- Free Embedded Linux Distro at http://www.snapgear.org ----
 
Reply With Quote
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
mount mount file system using nfs Jim Anderson Linux Networking 2 07-16-2008 09:19 PM
HELP with autofs and NIS: How to override mount options on all mount points? theosib@gmail.com Linux Networking 0 03-04-2006 09:12 PM
NFS mount won't mount at boot, but mount -a works fine. BT Linux Networking 2 09-23-2004 09:37 PM
How to disable drive mapping by VPN users? AS Windows Networking 4 09-08-2004 10:31 AM
PROFTPD: Some users cannot upload files, some users cannot get directory listing Marc Linux Networking 0 10-24-2003 06:18 AM



1 2 3 4 5 6 7 8 9 10 11