The root account is the most privileged account on a Unix system. The root account has no security restrictions imposed upon it (Hmm…there are some exceptions though). When you are logged in as super user, you don’t have to face any questions. Therefore it is easy, with a mistyped command, to wipe out crucial system files or even the whole system all of a sudden. I have had situations where I forgot my root password and is unable to do any administrative level tasks. Due to increase in different type of cloud services, users are forced to manage large number of passwords and it is very common to forget some of them which may include the system’s own root password. What can we do in those situations? Either we recover or just reset the previous root password with a new one. The former is Read More »
Tag: chroot
Working under a limited access environment with chroot jail
For normal users of a GNU/Linux system, chroot command may not be quite familiar to them. Whereas explanation is totally unnecessary for people working at the server side. The term jail is used in the sense to convey the concept of limited access. chroot is commonly used to run command or interactive shell with special root directory. On installing a GNU/Linux system / is the root directory and all the programs are rooted at /. All files are accessible inside / and not from outside. Without changing the current situation we now tend to create another environment whose root directory some place other than /. This new root directory can be defined using the chroot command. For establishing such an environment first we need to find/create a empty directory as the new root directory. For instance, suppose /home/user/jail is our new root. Now,
Get into the directory
$cd /home/user/jail
Create a subdirectory named bin
$mkdir bin
Read More »