Calling the following lists the disk space available on all mounted drives:
df -h
Here's some (painfully complex) output:
Filesystem Size Used Avail Use% Mounted on tmpfs 50M 0 50M 0% /lib/init/rw udev 10M 6.6M 3.5M 66% /dev tmpfs 50M 0 50M 0% /dev/shm rootfs 1.9G 1.1G 759M 59% / tmpfs 50M 3.1M 47M 7% /tmp ramlog-tmpfs 20M 2.4M 18M 12% /var/log /dev/sda4 2.8T 169G 2.6T 7% /DataVolume
For a linux user to be able to execute commands as root they need to execute using the sudo command. A user is not permitted to do this (even if they know the root password) unless they are in the sudoers file. To add a user to this file simply edit the sudoers file when logged in as root:
sudo vim /etc/sudoers
Then add the user. I've added the NOPASSWD: flag so that I don't have to always enter the root password. I don't normally do this but on this machine the root password is pain to type!
scott ALL=(ALL) NOPASSWD: ALL
After creating a user using useradd you need to enable SSH access if the user is to be able to login to the machine remotely. This is done by editing the SSH daemon config file:
sudo vim /etc/ssh/sshd_config
Then add the user to the AllowUsers section (space separated):
AllowUsers root scott claire
For the changes to take effect restart SSH.
sudo /etc/init.d/sshd restart
© Scott Dupoy
Hits: 59252
July 2009 (1)
April 2009 (2)
September 2008 (3)
August 2008 (1)
July 2008 (2)
June 2008 (18)
May 2008 (37)
April 2008 (24)
March 2008 (27)
February 2008 (43)
January 2008 (27)
December 2007 (13)
July 2005 (1)
Change Banner
Toggle Columns
Toggle Centering
Claire Dupoy
12PC
Shayele
Alpine Apres
