View previous topic :: View next topic |
Author |
Message |
Henk_van_Gerwen Blue Pill

Joined: Dec 02, 2005 Posts: 3
|
Posted: Fri Dec 02, 2005 6:47 am Post subject: Use NeoOffice as root user |
|
Hello, when I try to use NeoOffice as root user, it does'nt allow me to do so.
Is there a way to overcome this "problem", because I'm using other software where I have to be root I want ofcourse use every application as root.
Thank you in advance!
Henk |
|
Back to top |
|
 |
Guest Guest

|
Posted: Fri Dec 02, 2005 9:45 am Post subject: |
|
Something I'm still trying to comprehend to this day. When you install Neo/J (OK, just called Neo now apparently as the cocoa effort Neo/C has been abandoned) it installs with root owner. So I don't see why one should have this problem, yet obviuosly you do. I run it, and therfore assume everyone else does too then, logged in as me yet if you get info, I think you will see the owner as root. Maybe Pat or Ed can clarify... |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Fri Dec 02, 2005 9:56 am Post subject: |
|
Running as root is disabled on purpose. Over a year ago I added this code because we found that running as root causes the underlying OpenOffice.org code to act like it is in "single-user install" mode. In this mode, OpenOffice.org starts writing user preferences in the /Applications/NeoOffice.app files. This, in turn, makes Neo pretty much unusable for any other user account on your machine.
The only way to run Neo while logged in as root is to execute Neo as a non-root user in a terminal:
sudo -H -u <non-root-user-name> /Applications/NeoOffice.app/Contents/MacOS/soffice.bin
Note that the "-H" and "-u" parameters must be used.
Patrick |
|
Back to top |
|
 |
ovvldc Captain Naiobi

Joined: Sep 13, 2004 Posts: 2352 Location: Zürich, CH
|
Posted: Fri Dec 02, 2005 11:32 am Post subject: |
|
To add to that: it installs as root to be able to use multi-user mode and this also keeps the application safe from users who start to mess with it. The fact that it doesn't run as root is also good since the user will not easily be able to mess up system files under root priviliges..
Of course, one would expect root users to know what they are doing, but for alpha software that is also found by a less experienced administrator, this might just be the safest thing.
See Patrick's workaround above if you want to use it while logged in as root. _________________ "What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi |
|
Back to top |
|
 |
jjmckenzie51 The Anomaly

Joined: Apr 01, 2005 Posts: 1055 Location: Southeastern Arizona
|
Posted: Fri Dec 02, 2005 3:06 pm Post subject: |
|
ovvldc wrote: | To add to that: it installs as root to be able to use multi-user mode and this also keeps the application safe from users who start to mess with it. The fact that it doesn't run as root is also good since the user will not easily be able to mess up system files under root priviliges.. |
Here is one additional fact that has not been pointed out by either Patrick or Oscar. The root user login is disabled by default on all MacOSX installations and you have to go through some serious hoops to get access to it. This is definately DELIBRATE. I know of many reasons, most to do with system security that you NEVER want to work on your system as the root user. If you have an application that requires you be the root user then attempt to run in in a sudo session. This is MUCH safer. I would also as the application's developer if the application can be rewritten to run as a system administrator rather than root. I will give you one example of why you should never run your system as root and this is a practical example (I've never done this but I have done what I am about to say in a critical directory and ended up reinstalling, patching, installing applications on a system that I no longer have.) As an ordinary user, cd to root (/). Type in rm -rf * and hit enter. You should not be able to delete ANYTHING except files that you installed (as a matter of fact you should receive an immediate error message). If you were logged in as root, you would not receive this error message and you would should end up with a nice clean empty hard drive (assuming that you did not hit the Escape key and waited for the # prompt to return.) Yes, you could do the same thing with a system administrator account, but you would have to use the super-user do (sudo) program and actually have to type in a password.
And I agree with Patrick's automatic disabling of using Neo (or even OpenOffice will not allow) as the root user.
James |
|
Back to top |
|
 |
sardisson Town Crier


Joined: Feb 01, 2004 Posts: 4588
|
Posted: Fri Dec 02, 2005 3:36 pm Post subject: |
|
I thought this prohibition was in the wiki already, but it was just the admin-install requirement (caused by the same boneheaded OOo code behavior), so I've added info about root to the Installation Issues page....
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki |
|
Back to top |
|
 |
Guest Guest

|
Posted: Fri Dec 02, 2005 6:09 pm Post subject: |
|
Thanks Pat for the workaround and thanks to the remaining Neo braintrust for the thorough explanation and cautions. |
|
Back to top |
|
 |
jjmckenzie51 The Anomaly

Joined: Apr 01, 2005 Posts: 1055 Location: Southeastern Arizona
|
Posted: Fri Dec 02, 2005 7:05 pm Post subject: |
|
Guest wrote: | Thanks Pat for the workaround and thanks to the remaining Neo braintrust for the thorough explanation and cautions. |
You are welcome.
James |
|
Back to top |
|
 |
Henk_van_Gerwen Blue Pill

Joined: Dec 02, 2005 Posts: 3
|
Posted: Mon Dec 05, 2005 1:18 am Post subject: Use NeoOffice as root user |
|
Thanks for the answers, tried but got the messages below.
Please advise me!
sudo -H -u henk /Applications/NeoOffice.app/Contents/MacOS/soffice.bin
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
JavaVM: JNI_CreateJavaVM called _exit, caught by abort_handler in javavm.cxx
Application Error
pure virtual method called
Kind regards,
Henk |
|
Back to top |
|
 |
val1984 Oracle

Joined: May 30, 2005 Posts: 229 Location: France
|
Posted: Mon Dec 05, 2005 3:38 am Post subject: |
|
Which applications require you to run them as root?  |
|
Back to top |
|
 |
pluby The Architect


Joined: Jun 16, 2003 Posts: 11949
|
Posted: Mon Dec 05, 2005 9:32 am Post subject: Re: Use NeoOffice as root user |
|
Henk_van_Gerwen wrote: | sudo -H -u henk /Applications/NeoOffice.app/Contents/MacOS/soffice.bin
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
JavaVM: JNI_CreateJavaVM called _exit, caught by abort_handler in javavm.cxx
Application Error
pure virtual method called |
Does the "henk" user have a valid home directory? The user needs to have a a valid, writable home directory (not "/") that it can create files in for Java to work. Also, is the current working directory readable by the "henk" user? If not, Java is choking on the fact that it cannot "pwd" the current directory.
Patrick |
|
Back to top |
|
 |
Henk_van_Gerwen Blue Pill

Joined: Dec 02, 2005 Posts: 3
|
Posted: Mon Dec 05, 2005 10:51 am Post subject: Use NeoOffice as root user |
|
Yes, user henk is an ordinary user that has all its directories etc.
I used this before I was using another application. But because of that application I must be root. By the way this application is "Ethereal", a network packet analyser installed with Fink-commander.
To run "Ethereal" one must be root because "Ethereal" must look and handle device files and they are only accessable by root.
Kind regards,
Henk |
|
Back to top |
|
 |
val1984 Oracle

Joined: May 30, 2005 Posts: 229 Location: France
|
Posted: Mon Dec 05, 2005 11:23 am Post subject: |
|
Ethereal is a command line program, isn't it?
Therefore, you should run it with "sudo" in your normal user account by typing something like "sudo ethereal".
It's dangerous to use the root account for day to day use... |
|
Back to top |
|
 |
Guest Guest

|
Posted: Mon Dec 05, 2005 11:32 am Post subject: Re: Use NeoOffice as root user |
|
pluby wrote: | Henk_van_Gerwen wrote: | sudo -H -u henk /Applications/NeoOffice.app/Contents/MacOS/soffice.bin
Error occurred during initialization of VM
java.lang.Error: Properties init: Could not determine current working directory.
JavaVM: JNI_CreateJavaVM called _exit, caught by abort_handler in javavm.cxx
Application Error
pure virtual method called |
Does the "henk" user have a valid home directory? The user needs to have a a valid, writable home directory (not "/") that it can create files in for Java to work. Also, is the current working directory readable by the "henk" user? If not, Java is choking on the fact that it cannot "pwd" the current directory.
Patrick |
that is, when you open a terminal.app window it shows a prompt of ...henk% before you enter the sudo... command line, corrcect?
Agree with others, you should check permissions on your Home folder and the Java stuff in the error message.. |
|
Back to top |
|
 |
jjmckenzie51 The Anomaly

Joined: Apr 01, 2005 Posts: 1055 Location: Southeastern Arizona
|
Posted: Mon Dec 05, 2005 3:13 pm Post subject: Re: Use NeoOffice as root user |
|
Henk_van_Gerwen wrote: | Yes, user henk is an ordinary user that has all its directories etc.
I used this before I was using another application. But because of that application I must be root. By the way this application is "Ethereal", a network packet analyser installed with Fink-commander.
To run "Ethereal" one must be root because "Ethereal" must look and handle device files and they are only accessable by root. |
As it has been pointed out, you can and it is RECOMMENDED that you run Ethereal in a sudo session. The user you run Ethereal must be a System Administrator, which I assume the henk user is.
James |
|
Back to top |
|
 |
|