[ubuntu-za] Root user in Ubuntu

Stefano Rivera stefanor at ubuntu.com
Sun Sep 9 08:42:15 UTC 2012


Hi Nico (2012.09.09_08:40:53_+0200)
> *I need to work as root user *
> I need to enable the root user and set the root user password in my
> Ubuntu workstation in a VM
> I could do sudu su but I need to login with full root as the root user

There's no difference. sudo -i gives you a root login shell.

If you want a graphical login as root, that's not recommended and would
be a bad habit to get into. root can do anything, and lots of the
programs that you'll be running in X aren't particularly careful about
what they stomp on.

> *How do I set root password*
> I know is solaris you would use a passwd command to set the root
> user's password

Same on Linux. To set root's password, run sudo passwd

> *What is root home directory*
> I also know in solaris the root users home directory in not
> /home/root   what is it in Ubuntu Linux?

/root

> **The root or sudo user cant see programs pathed for non-root users
> how do I fix that*
> Also I have seen certain program  ran when you logged in as non-root
> user which  did not get pathed and did not run on a Centos Server
> when you logged in as root

What does it mean to be pathed?

Typically, normal users have a PATH like this:
/usr/local/bin:/usr/bin:/bin
And root will have:
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

If you want sbin in your path, just add it in your ~/.bashrc:
export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin

> *I need to run Sun Java not the non-industry non-standard Java
> Ubuntu provides*
> One of the problems all professional Java developers have with
> Ubuntu is we need to use the Industry standard so our programs work
> Ubuntu tends to install its own "Non-Industry non-standard" Java
> Which we always have to remove and then it becommes a mission to get
> Sun java to work

However, Oracle's Java license doesn't allow Ubuntu to redistribute
Java. So ...

Try this PPA
http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html
As mentioned here:
https://help.ubuntu.com/community/Java#Oracle_Java_7

> *To get Sun Java running on Ubuntu*
> I remove the "Ubuntu supplied non-standard Java" then I edit
> /etc/profile and add JAVA_HOME="/usr/lib/jvm/java-6-sun-1.0.0.30 and
> then export JAVA_HOME
> 
> *Java does not run as the sudo or root user*
> This works when I run      java -version                      I get
> the right version of Java
> how ever when I run         sudo java -version            It cant find Java
> 
>  which file and or older do you put path information  so the Root or
> SUDO user can find the Java ?

bash only reads ~/.profile and /etc/profile when you are logged in
interactively (sudo -i).

Still, you shouldn't need to set JAVA_HOME at all. It usually isn't set
on Debian/Ubuntu, because we have /usr/bin/java in our PATH.

SR

-- 
Stefano Rivera
  http://tumbleweed.org.za/
  H: +27 21 461 1230 C: +27 72 419 8559



More information about the ubuntu-za mailing list