old-www/LDP/GNU-Linux-Tools-Summary/html/managing-users.html

249 lines
3.8 KiB
HTML
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML
><HEAD
><TITLE
>Managing users</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
REL="HOME"
TITLE="GNU/Linux Command-Line Tools Summary"
HREF="index.html"><LINK
REL="PREVIOUS"
TITLE="Controlling services"
HREF="controlling-services.html"><LINK
REL="NEXT"
TITLE="Users/Groups"
HREF="users-and-groups.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TH
COLSPAN="3"
ALIGN="center"
>GNU/Linux Command-Line Tools Summary</TH
></TR
><TR
><TD
WIDTH="10%"
ALIGN="left"
VALIGN="bottom"
><A
HREF="controlling-services.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="users-and-groups.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="MANAGING-USERS"
></A
>Chapter 10. Managing users</H1
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>su username</DT
><DD
><P
>(Switch User), change to a different user. </P
><P
>Use <EM
>su -</EM
> to switch to root or<EM
> su username</EM
>, to switch to a different username. </P
><DIV
CLASS="TIP"
><P
></P
><TABLE
CLASS="TIP"
WIDTH="90%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="../images/tip.gif"
HSPACE="5"
ALT="Tip"></TD
><TH
ALIGN="LEFT"
VALIGN="CENTER"
><B
>Using sudo</B
></TH
></TR
><TR
><TD
>&nbsp;</TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
> Its often considered better practice to use the <EM
>sudo </EM
>command rather than switch to the root user</P
><P
> The <EM
>sudo</EM
> command allows you to perform actions as root but logs the actions you take (so you can trace anything that was done to the system by yourself or others). <EM
>sudo</EM
> has a very good manual page which provides plenty of information about it.</P
><P
> You use sudo similar to how you execute a normal command with sudo prepended to it, for example:</P
><P
><TABLE
BORDER="1"
BGCOLOR="#E0E0E0"
WIDTH="90%"
><TR
><TD
><FONT
COLOR="#000000"
><PRE
CLASS="SCREEN"
> sudo rpm -U myrpm.i386.rpm </PRE
></FONT
></TD
></TR
></TABLE
></P
><P
> This would allow you to install a rpm even if you have the correct sudo access </P
></TD
></TR
></TABLE
></DIV
><P
>Note that if you want to return to your original user you don't use <EM
>su</EM
> again, type <EM
>exit</EM
> or press
<B
CLASS="KEYCAP"
>CTRL</B
>-<B
CLASS="KEYCAP"
>D</B
>
.</P
><P
>Simply typing <EM
>su</EM
> will give you some root privileges, but there are minor complications relating to environment variables. It's generally considered better practice to use <EM
>su - </EM
>because it has no restrictions.</P
><P
></P
></DD
><DT
>root</DT
><DD
><P
>The superuser. This user has power over everything and all, and can do anything with the system (including destroy it, and of course fix it :)). This user is used to perform most administration functions on the system.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="controlling-services.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="index.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="users-and-groups.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Controlling services</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Users/Groups</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>