root password for installations GUI < > terminal

Joined
Nov 7, 2007
Messages
23
Reaction score
0
Points
1
Hi,

This is the first time I've tried to install a piece of software using the terminal window (command line).

I'm trying to install autotrace, and downloaded the .tar file, no probs.
I read the install instructions and opened up a terminal window, ran 'configure' and got a 'can't find C compiler' error.
Installed Xcode.
Ran 'configure' and that seemed to work although there are various bits missing, (output supports for pstoedit, imagemagick, swf by ming, libpng).
Ran 'make install' to install the program. Got a message that had a bit saying 'permission denied'.
So far, when installing using a gui, the moment has come when there's a request for the root account name and password and I do that and everything has worked fine, and I guess that that's what's going on here too.

So, why wasn't there an option to put in the root account and password when using a terminal window?
How do I get round this? (So far I tried putting the source file into root's drop box, logged out, relogged in as root, but was unable to cd to the drop box. Why not? Curious.)

I spend most of my time not in root because I've understood this to be better practice. But does this mean clumsily having to log out/log and download again each time I download something that turns out to need a terminal procedure?

Any insight?

Thaks


Mac OS X 10.4.11 MacBook1,1 Intel Core Duo 2 GHz
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Instead of "make install" you need to type "sudo make install".
It will ask for your admin password. Should install then.
Might want to install the dependencies too...(libpng etc..).
(actually should have installed those first)
 
OP
B
Joined
Nov 7, 2007
Messages
23
Reaction score
0
Points
1
Ok I'll use "sudo make install".

Point taken about the dependencies. I've downloaded them, and looking at the installation instructions for Imagemagick, the advice is to ' Create (or choose) a directory to install the package into and change to that directory ...' Are there any implications / usual choices as to where such a directory should be created?
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Depends. Some people use /usr/local/bin. Some apps use /opt (macports).
Some use /sw (fink). Read the readme or install file that came with them and see if there are any preferences as to install locations.
 
OP
B
Joined
Nov 7, 2007
Messages
23
Reaction score
0
Points
1
So, I tried using sudo and got a message saying that I'm not in the sudoers file. Looking into it I came across a comment that suggests that putting your standard account into the sudoers file runs against the idea of improved security by using a non-admin account for the day to day stuff. Since I don't intend (once I've got this little can of worms sorted out) to install so much stuff, I'm going to download the software again using the admin account and work from there to install it.

However, I have a path problem.
Configuring pstoedit, I got a 'cannot find Ghostscript ... check PATH' message. I have Ghostscript, but how do I get it added to the path?

The ImageMagick readme calls for Fink for installing but that'll really have to wait as for the moment it' s just beyond me. Do you think it'll cause difficulties if I install this Imagemagick later?

(Is this drifting into a software issue? Basically, I'm trying to install some software that'll let me work on fonts and a bit of publishing and have no experience of using command line stuff and can't afford the pricey stuff).
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Actually it might be better to install Fink because installing apps which need dependencies will have them installed automatically.
Also, installing X11 apps should be done by an admin account so you have access privileges, unless you want to install them in your user folder.

As far as putting things in your $PATH, you need a .profile or .bashrc file in your home dir to set up the shell.
Check this page for some help on X11 and Fink: http://homepage.mac.com/sao1/fink/index.html
 
OP
B
Joined
Nov 7, 2007
Messages
23
Reaction score
0
Points
1
Thanks cradom. I've run out of time for the moment, but I'll be seeing this through as soon as I can.
 
Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
Are you an administrator on your system?

There's a Fink install available for Autotrace, but be warned: sometimes Fink fixes one headache but creates another.

The readme usually gives pretty good instructions on install pitfalls.
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
There's a difference between admin and logging in as root. You don't need to be root to install apps, it's actually not recommended as you can really screw things up.

As far as headaches...what is easier, doing the whole ./configure, make, make install thing for each individual library, app and dependancy for an app?
Or doing "Fink install "package" (or Port for macports)" and having it do all of it for you? Of course it's not perfect and can have problems, but then nothing is.
Everything Fink or macports installs goes into it's own dir, seperate from the system stuff and can be easily found or deleted if needed. Doing it by hand you don't really know where it's going.
 
Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
Cradom, that wasn't meant as a criticism of Fink, or your reply, and you're right, nothing's perfect.

But what I did mean is: I was once a newbie myself, and someone said, to me "Hey, use Fink!" and it wasn't all that easy to install or configure, and I still don't know where some of those files went.

But knowing what I know now: yes, it's one of the easier ways to do these sorts of things, but no, it doesn't magically make your problems go away. And sometimes a plain old "make install" is easier.
 
Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
Fink II


Aside from what I say in my last post, one of the bigger problems with Fink can occur if your version of OS X is not the same as your Fink installer's.

So if you get a version of Fink that was written for, say, OS X.4 and you're running X.5, you might have problems.

Another headache can arise if your paths are not what Fink expects.

OR, it might work perfectly for you, and I'm certainly not trying to steer you away from it. Fink's a good thing to know about, and if you can get it working you might never have to worry about Makefiles again.
 
Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
There's a difference between admin and logging in as root. You don't need to be root to install apps, it's actually not recommended as you can really screw things up.

This is entirely correct. What I meant is, can you log into your machine as an administrator?
 
OP
B
Joined
Nov 7, 2007
Messages
23
Reaction score
0
Points
1
This is entirely correct. What I meant is, can you log into your machine as an administrator?

I have a MacBook.
There is the root account.
I use another account for general day to day use.
In this day to day account, I've successfully installed stuff having been able to type in the root accounts username and password.

So two questions:
1. From my description above I understand that I can login as administrator when not root. Is that right?

2. It sounds like it should be possible to log in and not to have this admin privilege. How does that happen?


Also, I had a look at Fink and it's cleared my confusion about the directories enough to try installing it.

Comments welcome.
 
Joined
Mar 27, 2008
Messages
18
Reaction score
2
Points
3
I have a MacBook.
There is the root account.
I use another account for general day to day use.
In this day to day account, I've successfully installed stuff having been able to type in the root accounts username and password.

So two questions:
1. From the my description above I understand that I can login as administrator when not root. Is that right?
There's the login you have when you log into the system, and then there's the level of access you gain on the underlying Unix system that you get from going into the Terminal.

2. It sounds like it should be possible to log in and not to have this admin privilege. How does that happen?
When I say "admin" I mean the OS X login, not the Unix login. OS X users can be administrators, which is settable in System Preferences -> accounts. Since this seems to be your MacBook, I'm assuming you have Admin access.

But this is not the same as "logging in as root" to the Unix system, and Cradom is right, you shouldn't go mucking about in your system as root. You should go in as the default user (linked to the OS X user account) and then "su" or "sudo" up to that level access. Any user can do this, even if they're not Admin on the system, as long as they have the appropriate password.

In other words, my point is, the two levels of access are different from one another. Just because you're admin on your system, doesn't mean you're admin in the terminal, and vice-versa.

Does that help?
 
Joined
Feb 14, 2004
Messages
4,781
Reaction score
166
Points
63
Location
Groves, Texas
Actually, if you're an admin on the system, you are an admin in terminal. Think of it this way...
root - you are God, can do anything to the system whether in the gui or terminal
admin - slightly limited access compared to root. can still wreak havoc if not careful
user - pretty much limited to your own stuff..userfolder, can use but not add applications to /Applications, cannot read other users folders.

Root is not normally enabled on OS X because it can be dangerous to use. Only an admin can enable it. I think what you're referring to as "root" is an admin account. Normally when using terminal and needing to access things you can't normally access, you use sudo and your admin password. This is not root, just verifying that you have the right to access whatever you're trying to do.

Even when logged in as a normal user, in terminal you can verify access using the admin name and password (if you have it) to do things a normal user cant do using su.
 
OP
B
Joined
Nov 7, 2007
Messages
23
Reaction score
0
Points
1
There's the login you have when you log into the system, and then there's the level of access you gain on the underlying Unix system that you get from going into the Terminal ... When I say "admin" I mean the OS X login, not the Unix login.

I think what you're referring to as "root" is an admin account.

Yes, you're right, I now realize I meant the OS X login admin account.

Does that help?
Yes. Also, I read a bit about sudo which helps clarify too.

Even when logged in as a normal user, in terminal you can verify access using the admin name and password (if you have it) to do things a normal user cant do using su.

So, if I was logged in as a normal user, and went into terminal, how would I be able to do that? Or would there be a prompt asking for this information?
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top