Su: Difference between revisions

From OLPC
Jump to navigation Jump to search
(initial page on superuser mode.)
 
No edit summary
 
(9 intermediate revisions by 5 users not shown)
Line 1: Line 1:
== What is it? ==
This page is about using the '''su''' command in the [[Terminal]].
{{Code|'''su'''}} is a Linux/Unix command that allows one to run another command with '''s'''ubstitute '''u'''ser and group ID permissions.
* {{Code|su}} allows one user to temporarily become another user (most often the root user) if you know the user's password.


'''WARNING''' you can erase all the data on your OLPC by using the '''su''' command, so be careful.
This page is about using the {{Code|'''su'''}} command in the [[Terminal]].


'''WARNING''' you can erase all the data on your computer by misusing the {{Code|su}} command, so be careful.
On newer builds of the OLPC software, the superuser account is disabled by default.


==To set the password for su==
==To set the password for the {{Code|[[root]]}} user==
* Enter the [[terminal]] and type
* Enter the [[Terminal]] and type
sudo passwd
{{Code|sudo passwd}}
* You will be prompted to enter a new password for the superuser. Type one in, then press enter.
* You will be prompted to enter a new password for the root user. Key one in, then press Enter.
* Re-enter your password when prompted.
* Re-enter the password when prompted.
* If the two passwords were identical, you will see the message:
* If the two passwords were identical, you will see the message:
passwd: all authentication tokens updated successfully.
passwd: all authentication tokens updated successfully.


You should now be able to enter superuser mode by typing
You should now be able to start a new session in root user mode by typing

su -
and entering your new password.
{{Code|su -}} and entering the new password.

You can leave the root user session by entering the '''Ctrl D''' key combination or entering the {{Code|logout}} command.

==See Also==
* [[sudo]] The sudo command
* [[su -l]] one way to become the [[root]] user


{{Linux software}}

Latest revision as of 05:26, 2 August 2012

What is it?

su is a Linux/Unix command that allows one to run another command with substitute user and group ID permissions.

  • su allows one user to temporarily become another user (most often the root user) if you know the user's password.

This page is about using the su command in the Terminal.

WARNING you can erase all the data on your computer by misusing the su command, so be careful.

To set the password for the root user

sudo passwd

  • You will be prompted to enter a new password for the root user. Key one in, then press Enter.
  • Re-enter the password when prompted.
  • If the two passwords were identical, you will see the message:
passwd: all authentication tokens updated successfully.

You should now be able to start a new session in root user mode by typing

su - and entering the new password.

You can leave the root user session by entering the Ctrl D key combination or entering the logout command.

See Also


This command is run in the standard Linux environment via the Terminal Activity. The GUI will probably not integrate comfortably with the XO Laptop's Sugar environment. Your user experience may vary considerably depending on the established environment and the other programs running on the laptop, may need re-installation after an OS Update. See the Linux software category for other commands.