Changing ownership of files and directories is done using the CHOWN command.
Example:
$ chown -R www-data:www-data sample
- R applies the change recursively
www-data:www-data is the user and group
sample is the target file or directory
Notes
Changing ownership of files and directories is done using the CHOWN command.
Example:
$ chown -R www-data:www-data sample
- R applies the change recursively
www-data:www-data is the user and group
sample is the target file or directory
Deleting users is done using the USERDEL command.
Example:
$ sudo userdel -r -f username
-r = remove home directory
-f = force removal of files
Adding users to your system is done using the USERADD command.
Example:
$ sudo useradd -d /home/username -m username -p password -s /bin/false
- d = home directory of the new user
- m = create a home
- p = provide a password
- s = the login shell of the new user
-d and -m are used in conjunction.
You can assign /bin/bash for bash or /bin/false for no shell access.
You can change passwords later using $sudo passwd username.
To display the CPU information, type from the terminal:
# cat /proc/cpuinfo
Upgrading the Ubuntu Server, e.g. from version 8.04 to 8.10:
Step 1. Make sure your current distribution is up-to-date.
Step 2. Perform the upgrade!
To display the current Ubuntu version, issue this command from the terminal:
#lsb_release -a
To change IP address, you’ll need to edit /etc/network/interfaces
#sudo vi /etc/network/interfaces
The default configuration has “root” with no password. The following shows you how to lock down MySQL by assigning a password to root and creating a super user with all privileges for administration use.
#sudo mysql -u root -p
Copyright © 2003-2012. All Rights Reserved.