View Full Version : Starting as a deamon in MAC OS X
saggi_crishna
07-28-2002, 06:41 AM
Hi I have the following requirement. I need to start an application in MAC OS X as a Daemon. I did some work on this and i found that there needs to be some scripts in the startup items. But i do not have write access to this folder where i have to copy this file as i'm not the root. Kindly let me know how i can log in as root in MAC OS X.
Thanks
krishna
osxpez
07-29-2002, 05:45 PM
You shouldn't need to log in as root. If you have Admin privileges on your user you can use "sudo". Like so:
sudo cp your_file destination_path
sudo will prompt you for your password. That's the password of your user account, NOT root's password or the like. sudo stands for "superuser do" I think. At least you can think of it that way, because that's about what happens. In the example above root will be moving that file for you. Neat huh? In most configurations sudo will remember your password for I think five minutes from the last sudo command. So if you need to do several tasks as root you can fire away many sudo commands without having to type your password in all the time. Although you can do "sudo zsh" and hack away with root privileges I recommend against it. It's often safer not tom but instead think of every command that needs root privileges as something potentially dangerous. Besides, sudo logs every command it executes. That log can be really helpful at times. But not if it only has "zsh" or some such in it. =)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.