Linux: simulating/masking user ownership upon mount of 'external' partitions? -


this problem: have partition on ubuntu system, let's call myhdrive, not automounted upon boot (so use disk mounter applet, or nautilus mount manually). when mounted, listing partition looks in ubuntu:

$ ls -la /media/myhdrive/ total 5743740 drwxr-xr-x  8 myusername myusername       4096 2011-07-21 08:19 . drwxr-xr-x  4 root          root                4096 2011-07-21 04:13 .. -rw-r--r--  1 myusername myusername      98520 2011-07-21 08:19 file1.txt -rw-r--r--  1 myusername myusername       3463 2011-07-21 08:19 file2.txt 

now, let's shutdown ubuntu os - , boot, let's say, opensuse usb key on same machine. myhdrive partition again not automounted, , have mount manually (again file manager there). thing is, when mounted under opensuse, same drive displays following listing:

$ ls -la /media/myhdrive/ total 5743740 drwxr-xr-x  8 1000 1000       4096 2011-07-21 08:19 . drwxr-xr-x  4    0    0       4096 2011-07-21 04:13 .. -rw-r--r--  1 1000 1000      98520 2011-07-21 08:19 file1.txt -rw-r--r--  1 1000 1000       3463 2011-07-21 08:19 file2.txt 

obviously, myusername has uid of 1000 in ubuntu system, , there recognized - while same username not present in opensuse system, , uid not replaced filename.

the problem is, of course, cannot write myhdrive opensuse default - i'd first have chown entire partition - , then, when ubuntu system, i'd have chown again.

it's quite clear me not possible using gui tools - there method or command line switch, such can "fake ownership": mount partition in such way, real uid of 1000 interpreted 'the logged-in user' in usb-booted case (including that, when writes made partition 'the logged-in user', recorded under uid of 1000)?

thanks in advance answers,
cheers!

no. either keep authdb files in sync, or use external auth server.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -