Академический Документы
Профессиональный Документы
Культура Документы
Switch User su
Every user who has access to a Linux system needs a login and a password. Each user must belong to a
primary group and for security or access purposes can belong to several secondary groups.
In order to create new logins, modify or delete users, you must already be logged in as root. The root login
is the highest level and only certain individuals should have access to the root account.
-d home directory
-s starting program (shell)
-p password
-g (primary group assigned to the users)
-G (Other groups the user belongs to)
-m (Create the user's home directory
-d home directory
user's name (Only required if you are root and want to change another user's password)
Example: To change the password for the account you are currently logged in as...
passwd
Enter existing password
Enter new password
Enter new password again (to validate)
Example: To change the password for the user 'roger' (only you are logged in as root)...
passwd roger
Enter existing password (can be either roger's password or root's password)
Enter new password
Enter new password again (to validate)
top of page
Group name
Group password (hardly ever used)
Group ID
User names (separated by commas)
Default files
When a new user is created, the default files and directories that are created are stored in /etc/skel.
This directory can be modified to fit your needs. Modifications only effect new users and does not change
anything for existing users.
top of page
su - Switch User
To switch to another user, use the su command. This is most commonly used to switch to the root account.
Example: To switch to root account...
su
Enter root's passwd
Example: To switch to the user 'roger'...
su roger
Enter roger's or root's passwd