0

Background: I installed Ubuntu 14.04.2 LTS and would like to install and use Aptana (and Java). Google pointed me to the guide how to do this and i successfully did this under the initial Ubuntu account with administrative privileges. (this way: http://goo.gl/N5I1eW) However, as far as i understand, it is not safe to use the admin account daily. So, i created a standard account, but standard account does not have access to whatever i installed under the admin account and it may not sudo or install software. I am back to the clean Ubuntu 14.04.2 LTS with the admin and the standard users now. I could not find any guides about installing software for other users so far.

Not a duplicate of anything because: the new dimension of this question is related to security - installing Aptana for use not under the admin's account, but by admin to be used under the standard user's account. As a newbie, I am not sure of the finer details and would appreciate a clarification by a more experienced Ubuntu user.

viDim
  • 23
  • 1
  • 1
  • 8

1 Answers1

1

In most cases, installing applications for all users on Ubuntu requires root access. Binaries are installed in /usr/bin, which is writable only by root, and likewise for other installed files.

The usual way to install packages from the command line is using the apt-get tool, running under sudo:

sudo apt-get install package-name

If you run this from an account that has sudo access, it will prompt for your password and then run the command as root.

There are also GUI package managers; they'll prompt for your password when you do anything that requires root access.

However, as far as i understand, it is not safe to use the admin account daily.

It's not safe to run an interactive shell under the root account. It's too easy for a typo in a command to mess up your system. That's why sudo exists -- so you can (carefully!) execute individual commands as root while being logged in as an ordinary user.

I suppose that setting up one user account with sudo access, and another user account without sudo access (and using the latter for most purposes) is slightly safer than giving your usual user account sudo access. I've never bothered to do that myself. If the system is not shared with other users, I suggest just configuring your own account with sudo access and being careful about what you use it for. You'll have root access, but you won't be able to use it accidentally; typing sudo will be a reminder that you're doing something that could be dangerous.

Based on the information in this question, it looks like Aptana has to be installed by unzipping a downloaded file under /opt. The same considerations apply. Rather than running apt-get install under sudo, you'll just run unzip under sudo.

It's good to be cautious, even a bit paranoid, about using root privileges -- but if you need to install software, you need to use your root privileges.

Some software can be configured for installation under your home directory, to be used only from your own user account. On the other hand, some software is preconfigured to assume that, for example, its binaries are under /usr/bin. I don't know whether you can install Aptana under an ordinary user account. But judging from the answer to the linked question, I'd probably just go ahead and install it under /opt. There's always a risk in installing any third-party software, but people do it all the time.

On further thought, let me clarify some points.

There are (to an initial rough approximation) three kinds of accounts on the system:

  1. The root account. This account can do anything on the system: install software, read other users' files, reformat the disk. In normal usage, you should probably never login to this account.

  2. One or more administrative users. These are people who are trusted to use root privileges, for example to install software packages to be used by everyone on the system. Each administrative user can use the sudo command.

  3. Zero or more non-administrative users. These users do not have sudo access, and cannot install software outside their own home directories.

The systems I use have a single administrative user (me) and no non-administrative users, since I either own or control the entire system for my own use. A multi-user system will of course have more accounts.

It's also possible to modify the sudoers file to permit some users to run only certain commands as root; those users would be somewhere between 2 and 3 in the above list.

If you're the only user of the system (something that wasn't clear from your question), just set up a user account for yourself with sudo privileges. Use sudo only for administrative activities like installing software.

(Sorry about the length of this answer. I haven't had time to make it shorter.)