Denna delen av 99 uppdateras inte längre utan har arkiverats inför framtiden som ett museum.
Här kan du läsa mer om varför.
Mac-nyheter hittar du på Macradion.com och forumet hittar du via Applebubblan.

Logga in som root i terminalen..

Tråden skapades och har fått 4 svar. Det senaste inlägget skrevs .
1

Hello forumet,

har ett litet problem. Problemet är att jag försöker ta bort program som ligger direkt under rooten som inte går att ta bort i findern. Får felmeddelandet "....owned by the root". Ok tänker jag, då loggar jag väl inte mig som root i terminalen genom att skriva: "su root" och det är nu problemet kommer. Skall skriva in lösenordet, men det är inte samma som när jag loggar in i OS X. Finns det nått sätt att ta reda på vad root har för lösen? Känns lite fånigt att fråga, men kan inte komma på att jag angivit ett lösenord för root. Nån?

Tack på förhand.
/Sebastian

  • Medlem
  • Höganäs
  • 2002-08-09 00:26

Från utmärkta http://www.macosxhints.com :

Citat:

quote:Strong Warning: You should only enable root if you really really need it, really know what it´s for, and realize the security implications of enabling root! You can do everything you need to do with "su do", so root is really not needed ... with that said, here´s how to enable it - please understand what you´re doing and why before you do this!

The "root" user (also known as the superuser) is the most powerful UNIX account. The root account can do anything to any file or folder, anywhere on the system. For that reason, it´s considered quite dangerous, and only needs to be used (occasionally) by advanced users.

Because of the dangers of operating as root, Apple has chosen to hide the root account in OS X Final. However, there are a number of ways to enable it. The easiest is to boot off the install CD, and look under the Install menu for the "Password Reset" option. You can use this to change your own password if you forget it, and to enable the root account. This utility will not run if you copy it to your hard drive! It only works when booting from the CD.

Read the rest if you´d like to know how to do this from within OS X, and skip the CD-based reboot.
The second easiest way to enable root is to start a terminal session, and type:

sudo passwd root
You will be prompted for a new password to enable root access. Many find this easier than rebooting, but since it involves the command line, newcomers may find it a bit more intimidating.

The hardest way to enable root is to use the Netinfo Manager application (in Applications/Utilities). Here´s what you do, courtesy of "anonymous":

1) Open NetInfo Manager
2) Select "Users" from the second list.
3) Select a user you created andnd know the password for!
4) Double-click on the value across from "passwd" and copy it. It is the encoded form of the password for that user.
5) Select "root" from the list of users. Find the "passwd" value (default is "*") and paste over it.
6) Exit Netinfo Manager.
7) Open the Terminal and type "su root".
8) Enter the password for the user chosen above.

Tack för det snabba svaret!

Det ordnade sig nu, nu fick jag bort min irriterande kopia av itunes som hamnade där av misstag

sudo su

funkar oxo bra. När man vil gå ur rootläge skriver man exit.

su förutsätter att root är aktiverad, antingen via netinfo eller med ´sudo passwd root´, om jag inte minns fel.
Vill man kunna vara "inloggad" som root utan att aktivera funkar ´sudo -s´.

1
Bevaka tråden