Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

AmbitiousLemon

Moderator emeritus
Original poster
Nov 28, 2001
3,415
3
down in Fraggle Rock
I have a few questions about the root account in Mac OS X.

I recently wiped my hard drive and reinstalled all my operating systems from scratch (no reason, just for fun). As i was adding my custom icons i came across a problem (two actually, anyone notice the snoop website is down? if you have a copy you could send me please email me) i could copy and past most but not all of my icons into place. One of my 5 partitions refused to accept a new icon (the only partition with no data on it) and my users and system folders refused to accept custom icons (FYI i tried pasting and logging out and logging back in but the new icon wasnt taking).

So i logged in as root and presto chango i could paste the icons just fine.

While i was in root i noticed all of my preferences were gone (this is because most preferences are stored in custom preferences in a users library, not in the general library folder). I tried copying my preferences from my user's folder to my general preferences folder but this didnt work (apps would act like the old pref was there). i tried logging out and back in with no luck.

Next I noticed the root account has its own library folder. So i tried the same thing with the root's preferences with no luck. Back in OS 9 days I when I would have multiple operating systems I would just put an alias of my preferences folder in my main drive into the system folder of the other drives. This made sure that no matter what operating system i was using i never lost my serials or preferences.

Anyone know of how to do this between users and the root in Mac OS X?

Mac OS X has so many little "security" issues that require a user to use the root account that I would like to log in as root without losing everything. Also I would like to share some preferences between different users (havent tried this yet). I considered using root all the time but im a little hesitant to do this. Any Ideas?
 

Ensign Paris

macrumors 68000
Nov 4, 2001
1,781
0
Europe
I am know Unix expert but I think the Root is a kind of Super-User, it has access to everything and can change anything.

I will come back to this soon!

Guy
 

arn

macrumors god
Staff member
Apr 9, 2001
16,363
5,795
Originally posted by Ensign Paris
I am know Unix expert but I think the Root is a kind of Super-User, it has access to everything and can change anything.

I will come back to this soon!

Guy

Yes... Root can do it all...

To understate it... it's frowned upon to log in as root when you don't absolutely need to.

AmbitiousLemon... I'm not sure the problem you were having with the icons - but logging in as root all the time is not the answer... :)

arn
 

mac15

macrumors 68040
Dec 29, 2001
3,099
0
watch out when you log in root access
you can alter anything
log in using the sudo command its safer and you cant stuff up
your system folder

just a reminder
 

Ensign Paris

macrumors 68000
Nov 4, 2001
1,781
0
Europe
On my SGI box (Indigo2) I always worked in Root so I didn't have to change users to do things, and I was wondering if there is any problems with doing this in OSX?

Guy
 

arn

macrumors god
Staff member
Apr 9, 2001
16,363
5,795
Originally posted by Ensign Paris
On my SGI box (Indigo2) I always worked in Root so I didn't have to change users to do things, and I was wondering if there is any problems with doing this in OSX?

Guy

It's less concerning if you stay in the GUI the entire time...

but simple commandline commands can erase your entire drive etc....

arn
 

Taft

macrumors 65816
Jan 31, 2002
1,319
0
Chicago
Sharing preferences.

I don't have an answer for your icon problem (I've had problems myself). All I can say is that icons seem to be stored in a place hidden to the Unix part of OS X. I haven't been able to find them.

As far as sharing preferences, thats pretty easy. All you need to do is create a preference folder somewhere on your system that is accessible to both users who will be using it. Then create an alias to that folder in the where the library folder was in each user folder. The worst that can happen while doing this is that you will lose the preferences for your current session. If something goes really wrong, just login as root and recreate an empty Library folder.

To keep security tight, I recommend creating a group to hold both users and then setting the permissions on the global prefs foldder to 770. Try this:

Open up Utilities->NetInfo Manager. Click the little lock to authenticate. In the second column, you should see an item named 'Groups'. Click on it. In the third column you will now see all groups available on your system.

With 'Groups' still selected, go to the Directory menu and select New Subdirectory. Name the new subdirectory the name of the group; lets say 'special'. Select your new group.

Now we just need to add a few properties. Click on the box at the bottom of the window. You should see one property: name, with a value of: special. Go to the Directory menu and select New Property. Name the property 'password' and set its value to '*'. Do the same thing for another property:gid, with a value of 201. The gid is the unique group identifier and its value can be any number not already in use by another group.

Finally, add the users you want to be members of the group. Create another property: users. Give it a value of the first user you want to add to the group, let say: cliff. Now go to the Directories menu and select New Value. It will cause multiple values to appear under the 'users' property: one named cliff, the other blank. Add the other user to the blank value.

Done. Now we just have to apply the new group.

Open a terminal. cd to the directory your global preferences folder is in.

Now type:

chown cliff:special prefs
chmod 770 prefs

Where cliff is the name of the main user of the computer (one of the users you added to the group) and prefs is the name of your global preferences folder. If it doesn't work, add sudo to the beginning of each command and type your admin password when prompted.

The method outlined above for creating and managing groups works for a variety of circumstances and the concept of user groups is very powerful.

Welcome to the wonderful world of Unix groups and OS X!

Matthew
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.