--[ Virtualbox Headless VM server ]
A tutorial how to install virtualbox for VM's on a headless server, combined with a webif to manage it all.
--[ Add sudo user to Kali ]
Open a terminal and issue the following command.
#useradd -m
-m creates a home directory for the user.
Now we have to set a password for the user.
#passwd
It will ask you to create a new password.
At this point, we have a new user account. But we might want to add our new user to the “sudoers” group, so that we can use “sudo” to do administrative actions.
#usermod -a -G sudo
The option -a means to add and ‘-G sudo’ means to add the user to the sudo group. If you want to know more about the usermod command, issue #man usermod command to know more about usermod
Now we have to specify the shell for our new user.
#chsh -s /bin/bash
chsh command is used to change the login shell for a user.
All done.! you are all set. You could logout and login to your new account.
#useradd -m
-m creates a home directory for the user.
Now we have to set a password for the user.
#passwd
It will ask you to create a new password.
At this point, we have a new user account. But we might want to add our new user to the “sudoers” group, so that we can use “sudo” to do administrative actions.
#usermod -a -G sudo
The option -a means to add and ‘-G sudo’ means to add the user to the sudo group. If you want to know more about the usermod command, issue #man usermod command to know more about usermod
Now we have to specify the shell for our new user.
#chsh -s /bin/bash
chsh command is used to change the login shell for a user.
All done.! you are all set. You could logout and login to your new account.
--[ Boot RPI with NFS storage ]--
Booting XBMC OpenELEC with NFS storage
I have had a raspberry pi type B for a few weeks now and one problem that I have is on the SD card which can get stressed and corrupt XBMC data. I was looking for a solution tonight and eventually stepped on it reading a few pages from the wiki. Since I still want to use the SD card, I just changed/flash/cmdline.cfg to contain this:
1
| ip=dhcp boot=/dev/mmcblk0p1 disk=NFS=192.168.0.66:/media/xbmc |
Of course, you will need to change the NFS server and mount point as they are likely to be different. Worth noting that I rsync’d the content of /dev/mmcblk0p2 (/storage in OpenELEC) so I would not have to scan my whole collection again.
There is also a full procedure to netboot your Raspberry Pi but this did not appeal to me, details there.
--[ ufw ]
It should be installed by default in Ubuntu, but if for some reason it’s not, you can install the package using aptitude or apt-get using the following commands:
sudo apt-get install ufw
Check the Status
sudo apt-get install ufw
Check the Status
--[ Ubuntu 14.04 hardening ]
Assume that all these operations need to be performed as root, which you can either do with
sudo or by logging in as root first. (I've noticed that Ubuntu users seem particularly averse to logging in as root, apparently preferring instead to issue an endless series of commands starting with sudo, but I'm afraid that kind of extra hassle is not for me, so I just log in as root first.)Harden SSH
--[ Set session type to text or graphical ]
Get the current session type, text-mode or lightdm+xfce:
Set the current session type to text-mode by disabling lightdm autostart:
Enable lightdm autostart:
Code:
systemctl get-default
Code:
systemctl set-default multi-user.target
Code:
systemctl set-default graphical.target
--[ Setup SSH private key ]
—Create the RSA Key Pair
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
# ssh-keygen -t rsa
The first step is to create the key pair on the client machine (there is a good chance that this will just be your computer):
# ssh-keygen -t rsa
Subscribe to:
Posts (Atom)