0

I have set up my MacBook Pro 8,1 to dual-boot Ubuntu 13.04 + OSX Mountain Lion.

After the installation was finished I changed my Linux UID to 501 so that it matches the UID on the OSX install. I updated all file permissions, Ubuntu seemed to have no problems.

I can mount the OSX partitions in terminal (and I don't need sudo to do it):

/usr/bin/udisks --mount /dev/sda3

and they mount to

/media/<device name>

I can also read the OSX partitions and write to the unjournaled OSX partition.


In Nautilus there are links to the partitions under Devices in the sidebar, but these links won't mount the partitions they link to. I get a message that the location cannot be displayed and I don't have the necessary permissions.

If I mount the partitions via the terminal first, then the sidebar links do work, but the links won't work to unmount without authenticating, a message pops up saying they were mounted by another user.

According to /var/log/syslog, clicking the link uses the correct UID

Jul 15 17:42:34 silverfox dbus[930]: [system] Activating service name='org.freedesktop.hostname1' (using servicehelper)
Jul 15 17:42:34 silverfox dbus[930]: [system] Successfully activated service 'org.freedesktop.hostname1'
Jul 15 17:42:41 silverfox udisksd[1920]: Mounted /dev/sda3 at /media/mathew/book on behalf of uid 501
Jul 15 17:50:24 silverfox dbus[930]: [system] Activating service name='org.freedesktop.hostname1' (using servicehelper)
Jul 15 17:50:24 silverfox dbus[930]: [system] Successfully activated service 'org.freedesktop.hostname1'

Jul 15 17:50:26 silverfox udisksd[1920]: Cleaning up mount point /media/mathew/book (device 8:3 is not mounted)
Jul 15 17:50:26 silverfox udisksd[1920]: Unmounted /dev/sda3 on behalf of uid 501

What's the difference between what I do via the terminal and what Nautilus is doing?

Any advice on how can I dig a bit further into understanding and fixing this?

1 Answer 1

1

Well I never found out what i did wrong exactly, so i deleted everything and re-installed. This time I created another admin user first, then used that to create my user with uid 501, instead of starting with uid 1001 and changing to 501.

I'm newish to linux so I didn't do this the most efficient way, but it seems to have worked. This is what i did:

In terminal with my first admin user login

sudo useradd -u 501 -m <my new admin user>
sudo adduser <my new admin user> sudo

looking in my bash history, i seem to have done both of these, which I'm sure is redundant:

sudo adduser -s /bin/bash <my new admin user>
sudo usermod -s /bin/bash <my new admin user>

then i added my user to all the groups my first admin user was part of groups

sudo adduser <my new admin user> adm
sudo adduser <my new admin user> cdrom
sudo adduser <my new admin user> dip
sudo adduser <my new admin user> plugdev
sudo adduser <my new admin user> lpadmin
sudo adduser <my new admin user> sambashare

the dialout group I added because it had group id 20, the same group id my osx login, not sure if this is required or ideal but it is what I did:

sudo adduser <my new admin user> dialout

sudo passwd <my new admin user>

sudo apt-get install gksu
gksudo gedit /etc/login.defs

I edited login.defs to change the minimum user id to 500, so my new id would show up in the login screen

then I realised the default group for my new user was set to 1001 not 501, just to keep things neat I set this to 501. If I really understood the implications, perhaps I would have set it to 20 to match my osx user perfectly

sudo groupmod -g 501 <my new admin group>
find / -group 1001 -exec chgrp -h 501 {} \;
sudo find / -group 1001 -exec chgrp -h 501 {} \;
sudo usermod -g 501 <my new admin user>

and set my default shell to bash

sudo adduser -s /bin/bash <my new admin user>

Nautilus now seems to work as expected.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.