[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

How to correctly su to root (read, please)

On Thu, 03 May 2007, Anton wrote:
> >No... I just started the Xterm, become root (su) and then done the 
> >fc-cache.
> Oh, god! That was the key! Logged as root on console then fc-cache
> -f... and voila! Delays disappeared.

If you need to su to root, the textbook-correct way of doing it on the
command line is this:

	/bin/su -

(note the minus sign, it is very important. The full pathname is recommended
for safety: it makes sure you are running the correct "su" and not something
else by mistake).

If you leave out the minus sign, environment variables won't be reset to the
required ones for that user (root in this case), the user login
profiles/scripts won't be run, and not everything will work correctly.

  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

Reply to: