How to get root access and … ?

IDM

Registered
how can i quit "loginwindow".

1. i can't delete a file called "AppleUSBMouse.kext" (it's a speedup of the normal mouse driver) from the Extensions/Library/System. it says i have to login in root mode. how can i do that ??

2. when i tried to update the antivirus definitions, it says "all apps must be quit before continuing" and after a while it says "can't continue because "loginwindow" can't be closed" (or quit)

3. can i use a usb-printer through a network (like usb printer sharing in classic) ??

any help would be greatly appreciated.

thnx


IDM
 

kilowatt

mach-o mach-o man
To enable root access:

Get into netinfo, its located at /Applications/Utilities/netinfo manager.app

under the domain menu, select 'Security' then 'Authenticate'.
Enter your credentials.

Ok, go to the 'Domain' menu again, select 'Security' then select 'Enable root user'.

Now, go to the 'Domain' menu, select 'Security' and select 'Change root password.'

There ya go, you now have enabled the root user with a password.

To become root in the terminal, type su (enter) followed by your root password.

Or, logged in as the administrator, type 'sudo (command)' where command is either -s (shell) or something like rm /bin/ladin. Enter your password, and you have done the command as root.

Now I don't quite understand why you need to remove AppleUSBMouse.kext, but if you use one of the above root-aquisition techniques, you can certainly remove it.

And the same for loginwindow, you shouldn't have to mess with that. But if you really feel the need... (I understand, sometimes I kill the strangest tasks for no real reason ;-)

get into the terminal
expand the terminal's window horizontally so its a bit larger. Make it atleast long enough for:
kilowatt 281 0.0 0.6 68960 4240 ?? Ss 0:02.29 /System/Library/CoreServices/login
to fit on one line.

Next, type this:
ps aux | grep login

that '|' thingy is called a pipe, you can make it by pressing shift \ (forward slash, just look on the keyboard, you'll see it).
Hopefully, something like this shows up:

[kilowatt@mach4 Named]$ ps aux | grep login
kilowatt 281 0.0 0.6 68960 4240 ?? Ss 0:02.29 /System/Library/CoreServices/loginwindow.app/loginwindow console
kilowatt 324 0.0 0.0 3136 80 std R+ 0:00.00 grep login
[kilowatt@mach4 Named]$

to kill the loginwindow, type:

kill 281

if it doesn't really die, use kill -9 281

281 happens to be the pid (program id) of my login window. Use whatever is appropriate for your ps aux output.


Now, why that works:

ps aux displays every process. ps by its self just displays the processes for that shell, usually something like tcsh and ps ;-).

The pipe directs the output of ps into the program called grep.

Not grep login searches whatever you give it for the string 'login'. There is much more that can be done with grep, like:
cat /etc/services | grep pop
to search /etc/services for the string pop.

kill does just that - it kills whatever you tell it to.

Say the dock has some icon bouncing up and down as if its loading, but it never finished loading, and the darn icon just will not stop trying to load or whatever.

find the pid of the dock (ps aux | grep Dock).
type:
kill -HUP 334
or whatever the pid is for the dock. -HUP restarts the process, and in this case, kills the dock and loads it back up.

There may be easer ways to do these things, but I think its important to learn ways like this first.

hope this helps, please post if you have anymore questions.
 

IDM

Registered
loginwindow. i could "kill" it so that i could install the nav-definition updates. is it totally removed or cani get it back. 'cos i found an other loginwindow on 283 when the first was 313

but killing (or removing) the AppleUSBMouse.kext didn't work. everytime i typed "ps aux" in the terminal, i got all the running processes but could find the mouse. when i tried to remove it manually, i got the error "this one can't be removed because you don't have access" (or so)

any more idea ??

IDM
 

scott

softer than ever!
I think you've confused kilowatt's two answers. His stuff about ps -aux was to let you display running processes and kill the loginwindow (a process) (btw, process IDs will change all the time, save for all but the most fundamental). The ps -aux stuff had nothing to so with deleting your mouse file.

To delete the mouse file, follow his directions to a) enable root access b) login as root, and c) delete the file

If you are trying to delete the file through the GUI (as opposed to through Terminal), just make sure you;ve enabled root access (and provided a password) then:

Under the Apple menu - LOGOUT
Once the login menu comes up - USE "root" as User, (your password) as pass.

Just a different way to do it if you don't like working in a command line interface.

You will then be logged in a root user (things will look defaulted to when you first installed). The difference is you now have access to deleting files that you do not as regular or administrator user (be careful!).

When you;ve deleted your mouse file, go back to LOGOUT and log in as your regular name, etc.........
 

IDM

Registered
now i got it how to remove unwanted files.

but the whole mystery behind os x looks a bit confusing to me (and my light brain… ;-))
in 1994, it was one of the reasons why i bought a mac instead of a pc. everything was so clear and easy to understand; documents, roots, folders, systemfiles in their folders etc etc..
is there a "simple" way to learn how all these terminal stuff works ?? i don't want to become a professional programmer but really would like to know what i can do (change, remove, delete) and where it is better not to touch.

anyway, i thankyou very much for your support and hope that i am able to give it back (to others who need help)

IDM
 
Top