Linux System Administration

last edited Fri, 15 Mar 2024 23:17:23 GMT
backlinks: null


This guide does not cover Securing Linux servers

Booting direct link to this section

Stop the GRUB boot process by pressing <Escape> during the brief time before it boots the default kernel in the default way.

Daemons direct link to this section

Enabled services will not start until next boot, services that are started will not automatically start at reboot.

pwd

Create a New User direct link to this section

Creating a new user with a -m flag results in a home directory being created

sudo useradd -m username

interactive prompt, actually a front end for useradd

adduser <user>

view all available options

useradd -h

set user password

passwd user02

add user to superuser group direct link to this section

usermod -aG sudo <user>

Managing Permissions direct link to this section

Access Level Octal Value
read 4
write 2
execute 1
chmod 740 file2
# chmod u=rwx,g=r,o-rwx file2

This is commonly refered as absolute mode.

Building Software From Source direct link to this section

Everyone hits this wall when their chosen distro do3esn't have a specific package.

Assuming you are building from tar archives:

./configure
make
make install

For RPM based systems:

cd ~/rpmbuild/SPECS
rpmbuild -bb package.spec
tree ../RPMS
rpmbuild --clean package.spec
rpm -Uvh ../RPMS/arch/package-file.rpm

Check SSH Logs direct link to this section

cat /var/log/auth.log | grep "Failed password"