Check if an installation went well or where to find the corresponding files, example where are samba’s configuration files):
whereis samba
Check if an installation went well or where to find the corresponding files, example where are samba’s configuration files):
whereis samba
If you want to install cockpit on your server, follow these steps:
To install cockpit on Ubuntu, run the following command:
sudo apt install cockpit
Additionally, install the following package for more detailed metrics:
sudo apt install cockpit-pcp
Now there is a bug in Ubuntu, prohibiting cockpit to update the system through the webinterface (packagekit cannot refresh cache whilst offline). This seems to have to do with differences in netplan and network manager. To overcome this, you have to create a a placeholder file and a network interface:
nano /etc/NetworkManager/conf.d/10-globally-managed-devices.conf
Add the following two lines to that file. Save the file ant quit the nano editor.
[keyfile]
unmanaged-devices=none
Optionally: If you run Ubuntu on an ARM system, you may need to install the following packages:
sudo apt install linux-modules-extra-raspi
Now set up a dummy network interface:
nmcli con add type dummy con-name fake ifname fake0 ip4 1.2.3.4/24 gw4 1.2.3.1
Reboot your machine. Now you should be able to update the packages in the web interface.
Cockpit should be starting automatically. If this does not happen, configure it to do so:
systemctl start cockpit
systemctl enable cockpit
Access your cockpit installion under https://my.server.IP.address:9090
Source: https://cockpit-project.org/faq.html
If you happen to see the following error when enabling cockpit:
The unit files have no installation config (WantedBy=, RequiredBy=, Also=, Alias= settings in the [Install] section, and DefaultInstance= for template units). This means they are not meant to be enabled using systemctl.
Than you have to edit the configuration file:
sudo nano /usr/lib/systemd/system/cockpit.service
And add the following lines at the end, save and start the service:
[Install]
WantedBy=multi-user.target
systemctl enable cockpit.service
systemctl start cockpit.service
After installing a new hard drive, you have to follow a few steps to make it usable on your Linux system. Be sure not to erase an existing file system.
fdisk -l
cfdisk /dev/sdX
mkfs.ext /dev/sdXY
nano /etc/fstab
Add the line for the newly created filesystem. I prefer to refer to it by UUID and not by device ID (these might change). Get the ID using this command “cd /dev/disk/by-uuid” and “ls -l”.
/dev/disk/by-uuid/3a9128c0-c9c2-47e7-b9f0-edc049ff4d3f /data ext4 defaults 0 1
source: https://superuser.com/questions/872257/how-to-make-a-new-disk-usable-on-ubuntu-linux
usermod -d /new/homedirectory username
getfacl /var/www
# file: www
# owner: root
# group: root
user::rwx
group::r-x
other::r-x
You might need to install ACL (apt install acl).
Use setfacl to add a group to the ACL
setfacl -m g:family:rwx /var/www/
This leads your check on ACL like this:
# file: www
# owner: root
# group: root
user::rwx
group::r-x
group:family:rwx
mask::rwx
other::r-x
Removing an ACL entry:
setfacl -x g:family /var/www
Granting an additional user read-write access
setfacl -m u:jhemp:rw /var/www
More information: https://help.ubuntu.com/community/FilePermissionsACLs
sudo nano /etc/ssh/sshd_config
Uncomment the following entry in the sshd configuration file and change it to yes:
PermitRootLogin Yes
Restart the SSH service
sudo systemctl restart sshd
You have to create a password for the root user:
sudo passwd root
qm unlock [VMID]
Manual lock deletion
rm /var/lock/qemu-server/lock-[VMID].conf
Look for differences in two folders:
rsync -avnc $SOURCE $TARGET
Have the live system log displayed:
tail -f /var/log/syslog
tail -f /var/log/kern.log
Get all error messages across log files
journalctl -p err -f
or
/cat var/log/syslog |grep -iE "error|fail"
dmesg |grep -iE "error|failed"
Grab the system log from a remote server (and save on your desktop):
scp root@10.X.Y.Z://var/log/syslog ~/Desktop/syslog
Find out which DNS servers are used by your Linux system:
resolvectl status
Get the IP for a hostname:
nslookup www.apple.com