/r/linuxadmin

Photograph via snooOG

users voted

Expanding Linux SysAdmin knowledge

GUIDE to /r/linuxadmin:

  • Please consider that a new submission must help Linux SysAdmins
  • General blog/news/review posts belong in /r/linux
  • Articles/tutorials that simply reiterate what's in a manpage or a README, without adding significant value, are not useful
  • Inflammatory material doesn't help anyone but trolls

/r/linuxadmin aims to be a place where Linux SysAdmins can come together to get help and to support each other.

Related reddits:

Footnote:

Talk realtime on IRC at #/r/linuxadmin @ Freenode.

/r/linuxadmin

215,254 Subscribers

8

Advice needed on choosing 5 Red Hat certifications to advance in DevOps and System Architecture

Hello,

I’m currently working in a "DevOps" role and have the opportunity to pursue 5 Red Hat certifications. I want to make the best choices to strengthen my profile in key areas like automation, containerization, and security.

Background

  • 10 years of experience with Linux in personal and academic use.
  • A Master’s degree in System Architecture and 2 years of professional experience in DevOps and system administration.
  • Comfortable with Linux administration fundamentals and basic automation using Ansible.

Career Goals

I aim to advance my skills in core "DevOps" and cloud-native areas, particularly in Kubernetes, containers, and infrastructure security.

What certifications would you recommend, and in what order ?

5 Comments
2024/11/10
17:28 UTC

8

Favorite stack for accessing and administering linux systems

Looking for your favorite infra solution stack to access and manage your linux servers in a secure way. Currently we are using SSH sessions from client workstation directly to the datacenters. I’m thinking something bastionlike is necessary to require all admins to pass a centralized demarcation point for visibility & monitoring. What are others using / preferring?

29 Comments
2024/11/10
03:03 UTC

0

What steps you do if server is not coming up after the Linux patching ?

Just wanted to know the different approaches you guys all perform.

11 Comments
2024/11/09
15:13 UTC

5

How to coordinate with etcd for a group of clients to run one task exactly

0 Comments
2024/11/08
18:20 UTC

7

Where's my inbox. Dovecot on Rocky9

I setup a dovecot pop3 server but I cannot get it to list email when I telnet in. I can see in the postfix logs that the message was delivered and i can cat my mailbox and see the messages. But the list command shows 0 messages. I've tried changing the maildir: option in /etc/dovecot/conf.d/10-mail.the real mailbox is in /var/spool/mail and is linked to /var/mail and to ~.

14 Comments
2024/11/08
04:07 UTC

3

Seeking advice on LVM

Edit: IDK what happend to the formatting. I choosed <c> for the info blocks. ...

Greetings!

I need to allocate more space on my system disk (LVM). Let me explain how it is configured today

root@pve:~# pvdisplay

--- Physical volume ---

PV Name /dev/nvme0n1p3

VG Name pve

PV Size 446.13 GiB / not usable <1.82 MiB

Allocatable yes

PE Size 4.00 MiB

Total PE 114209

Free PE 4097

Allocated PE 110112

PV UUID Ex5KXl-CG1M-TTF8-pJfu-Ytf9-2YzN-BctC33

root@pve:~# vgdisplay

--- Volume group ---

VG Name pve

System ID

Format lvm2

Metadata Areas 1

Metadata Sequence No 7

VG Access read/write

VG Status resizable

MAX LV 0

Cur LV 3

Open LV 2

Max PV 0

Cur PV 1

Act PV 1

VG Size <446.13 GiB

PE Size 4.00 MiB

Total PE 114209

Alloc PE / Size 110112 / 430.12 GiB

Free PE / Size 4097 / 16.00 GiB

VG UUID Gsm4dz-ABUB-sOfd-An5Q-4r24-F77d-ygkIRq

root@pve:~# lvdisplay

--- Logical volume ---

LV Name data

VG Name pve

LV UUID nJlb2b-li0L-srQJ-TN1E-C0WQ-ZGzW-GEwpF8

LV Write Access read/write

LV Creation host, time proxmox, 2024-11-05 11:17:49 +0100

LV Pool metadata data_tmeta

LV Pool data data_tdata

LV Status available

# open 0

LV Size <319.61 GiB

Allocated pool data 0.00%

Allocated metadata 0.52%

Current LE 81820

Segments 1

Allocation inherit

Read ahead sectors auto

- currently set to 256

Block device 252:4

--- Logical volume ---

LV Path /dev/pve/swap

LV Name swap

VG Name pve

LV UUID m9G7qA-YZ8e-0n24-FKt1-hPDA-Uu1T-xUyvGe

LV Write Access read/write

LV Creation host, time proxmox, 2024-11-05 11:17:30 +0100

LV Status available

# open 2

LV Size 8.00 GiB

Current LE 2048

Segments 1

Allocation inherit

Read ahead sectors auto

- currently set to 256

Block device 252:0

--- Logical volume ---

LV Path /dev/pve/root

LV Name root

VG Name pve

LV UUID 4pJAIT-4z9C-jRyK-9N12-ej0H-deLk-OtK6D4

LV Write Access read/write

LV Creation host, time proxmox, 2024-11-05 11:17:30 +0100

LV Status available

# open 1

LV Size 96.00 GiB

Current LE 24576

Segments 1

Allocation inherit

Read ahead sectors auto

- currently set to 256

Block device 252:1

root@pve:~# df -h

Filesystem Size Used Avail Use% Mounted on

udev 16G 0 16G 0% /dev

tmpfs 3.2G 4.9M 3.2G 1% /run

/dev/mapper/pve-root 94G 3.5G 86G 4% /

tmpfs 16G 46M 16G 1% /dev/shm

tmpfs 5.0M 0 5.0M 0% /run/lock

efivarfs 192K 63K 125K 34% /sys/firmware/efi/efivars

/dev/nvme0n1p2 1022M 12M 1011M 2% /boot/efi

/dev/md127 916G 324G 546G 38% /store

/dev/fuse 128M 24K 128M 1% /etc/pve

tmpfs 3.2G 0 3.2G 0% /run/user/0

As far as I can tell, the 446 GB disk is only allocated to 93 GB (root, data and swap). What are the steps needed to create and mount a new LV covering the remaining space? I am confident that the current data and root space is more than enough for the lifetime of this system.

5 Comments
2024/11/07
20:14 UTC

1

how encrypt a KVM Rootserver?

I would like to encrypt a KVM Rootserver (debian).

Which would be the best option to encrypt it, LUKS, gocryptfs?

or are there other solutions?

and would it then be safe enough to store some passwords saved in vaultwarden, keepass or something else?

thanks

13 Comments
2024/11/07
18:28 UTC

20

Seeking Advice on Upskilling for a Linux Admin Role

Hi everyone! I’m currently working as a jr sysadmin 🇨🇦 and handle a wide variety of tasks (windows). I’m planning to move to Nevada 🇺🇸next month, and over the past two years, I’ve been upskilling myself in Linux and Cloud technologies. I’ve earned my RHCSA, RHCE, and AZ-104 certifications, and most of my learning has been hands-on with a home lab I set up on VMware Workstation. My goal is to transition into a Linux admin role and eventually move into cloud-based positions. Right now, I’m also focusing on learning infrastructure automation with tools like Ansible and Terraform, while picking up Python for automation as well. I’d love to get your advice on how I can further deepen my Linux skills. I’m planning to expand my home lab for future learning. Do you think I should stick with VMware Workstation Pro, or would something like Proxmox be a better option? From a Linux admin’s perspective, what key skills should I focus on for my first Linux job? Do companies typically expect DevOps skills in addition to Linux knowledge? I know some DevOps concepts, but I’m not yet an expert. I’m eager to learn, and I’d really appreciate any suggestions you might have!

25 Comments
2024/11/07
16:49 UTC

12

defguard 1.0 - WireGuard with 2FA/MFA & real-time desktop client configuration sync!

Hi r/linuxadmin!

I'm very excited to share that our Open Source versatile access management solution with real WireGuard 2FA/MFA - defguard (https://github.com/defguard/defguard) has reached a major milestone 1.0 🎉with exciting features that may interest you:

💥 Real time & automatic sync for client configurations! First WireGuard client to support this feature!

🔐 External OIDC (Google/Microsoft/Custom) to login or create a defguard account.

❤️ New Kubernetes HELM charts (thanks to Prusa3D Research team!

🖥️ Our WireGuard 2FA/MFA Desktop Client has major updates, including: rewrite of the whole routing stack (on all platforms) with IPv6 support, tray menu for quick connect/disconnect, and lot of bugfixes!

✖︎ Ability to control our WireGuard client behavior

☑︎ core & proxy have now HTTP & gRPC healthchecks

🎶 Multiple DNS servers support & search domain support

We have also prepared a way for you to support the continued development of DefGuard. We are introducing an Enterprise License to enable access to some features (all enterprise features here). As much as we would love for DefGuard to remain completely free and open source for everyone, in order to build and maintain the best on-premise/self-hosted comprehensive access management solution, we believe this is the right path forward. Additionally, since DefGuard is a security solution, it requires a dedicated team not only to build new features but also to ensure ongoing updates, support, and security.

Having said that, we are preparing a process for students, open-source projects and non profit organizations to get Enterprise free of charge soon (you can apply here).

Going ahead, we are now starting to work on more awesome features:

  • Mobile clients with real 2FA/MFA
  • Full Desktop Client data encryption
  • ACLs (firewall rules)
  • Hardware keys MFA on our clients
  • Device Management
  • Site-to-Site VPN management

Any feedback is welcome!

Robert.

4 Comments
2024/11/07
12:02 UTC

3

Keep deleted files

I've got an fileserver that I rsync to another location every night in case of a disaster (theft, fire etc) so the user files are mirrored on the second location. However, I would like to save deleted files before deleting them on the second place. Like this: Location A, file is deleted, rsync to location B copy deleted file to location C and then delete file at location B. Any ideas how to achive this?

13 Comments
2024/11/07
08:39 UTC

3

Help with resume review for mid-career switch...Firefighter/Battalion Chief to Linux Administrator

https://preview.redd.it/lgof8yu23ezd1.png?width=2550&format=png&auto=webp&s=34adf49b736d18b5e00fbe44ff67090a41eb8377

https://preview.redd.it/w0dxeqx33ezd1.png?width=2550&format=png&auto=webp&s=cd73ddc59123680cd60b0c55e81f301c2d3cfc20

I'm looking for an initial review of my resume for a mid-life career switch. Looking to follow my lifelong passion for technology after a few (25+) years of doing something completely different.

- Perhaps Linux/System Administration positions? Ideally as part of a team as I'm really starting off as a junior admin given my lack of formal IT experience.

- I'm in the greater Seattle, WA area and am looking for remote and/or hybrid work preferably, although open to commuting in this area.

- 25 years in the fire service with 6.5 years prior to that as a Navy Submarine officer. BSEE in college. I'm at the point where I can financially support switching careers without worrying about the pay cut. I recognize I don't have formal experience in the field other than the 6 year stint as a solo contract developer.

- I haven't started hunting yet. It's been many many years since I last put together a resume and am looking for some initial feedback.

A couple of specific questions other than general resume feedback:

  1. Given my experience, are there any specific positions that you think I might fit into?

  2. Is it ok to list YoE as 6? Or something else?

Thanks so much! Happy to provide any additional information.

6 Comments
2024/11/07
02:23 UTC

5

Sysadmin/devops interview questions

anyone here has any idea or tools on how to prepare for the interview related to linux k8 and other tools ? Anything will be appreciated

5 Comments
2024/11/06
19:32 UTC

0

How do you manually install java openjdk?

So my current openjdk version is 11.0.23 and i needed to update it to 11.0.24.
I downloaded the package and extracted it on the system.

Then the extracted files has some bunch of folders and stuff.

How do you actually install this to the system? im using centos 7

Thanks in advance.

17 Comments
2024/11/06
19:00 UTC

3

OpenVZ Virtuozzo containers tutorial

1 Comment
2024/11/06
13:10 UTC

3

Celebrating 14 years of Rex with Rex-1.15.0 release

3 Comments
2024/11/06
09:06 UTC

3

Cloud Init not applying network settings?

This was turning into a saga, so I'm replacing the post with just the current issue.

Problem I can ping the gateway and computers on the LAN, but I can't reach outside past the local network.

This is /etc/network/interfaces.d/50-cloud-init after first boot:

auto lo
iface lo inet loopback
    dns-nameservers 192.168.1.131 192.168.1.251

auto enp1s0
iface enp1s0 inet static
    address 192.168.1.188/24
    dns-nameservers 192.168.1.131 192.168.1.251
    dns {'nameservers': ['192.168.1.131', '192.168.1.251'], 'search': []}
    post-up route add default gw 192.168.1.251 || true
    pre-down route del default gw 192.168.1.251 || true

This is the network-config file:

version: 2
ethernets:
  enp1s0:
    match:
      name: enp1s0
    addresses:
      - 192.168.1.188/24
    dhcp4: false
    dhcp6: false
    routes:
      - to: 0.0.0.0/0
        via: 192.168.1.251 # Default gateway for IPv4
    nameservers:
      addresses: [192.168.1.131, 192.168.1.251]
3 Comments
2024/11/06
08:44 UTC

2

Cloud Init: Can't login to new cloud image

I'm using virt-install with `--cloud-init user-data="/path/to/user-data.yml".

The installer runs and creates a new virtual machine and I can see the login prompt with virsh viewer.

But I can't login, and I can't figure out how to make cloud-init create/enable an account.

The contents of user-data.yml are:

#cloud-config
users:
  - name: me
    gecos: Test User
    primary_group: me
    groups: sudo
    lock_passwd: false
    passwd: password

growpart:
  mode: auto
  devices: ['/']
  ignore_growroot_disabled: false

This should create a user named me with a password that is literally password.

This doesn't work. I can't login, and it says the username and password are invalid.

I'm using the Debian 12 generic cloud image. I have no idea how to troubleshoot this if I can't login to the guest machine to see what cloud-init is doing.

4 Comments
2024/11/06
06:07 UTC

6

What is the command that copy-expands a qcow2 OS image to a logical volume?

If I have an OS cloud image, like those found here:

https://cloud.debian.org/images/cloud/bookworm/20241004-1890/

that is in a .qcow2 format like debian-12-genericcloud-amd64-20241004-1890.qcow2, and I want to copy-expand the image onto a new Logical Volume, what is the correct command to use?

I think I would use qemu-img but there are several different modes and options, and it's not clear which I would need to use.

The .qcow2 image is about 400 MiB, the new Logical Volume is about 5 GiB, the newly created LV doesn't have a file system, but the .qcow2 would have a file system, so it seems I would need to copy the data, but also expand the filesystem so all the space becomes usable.

What is the command that copy-expands a .qcow2 OS image to a logical volume?

2 Comments
2024/11/06
02:25 UTC

2

Cockpit Virtual Machine creation - how do you select which storage pool to create VM file in?

This is probably a pretty noob question but... I'm trying cockpit on Ubuntu Server with root on ZFS. I have a separate NVME drive in the machine also set up with a ZFS pool as a dedicated storage area for VMs. But when I try to create a new VM, it clearly chooses the default pool which is on my tiny boot drive. I've even tried deactivating the default storage pool (in the VM panel) but it still defaults to the default pool when I try to create a VM. It would seem to me that there should be a field for selecting which VM storage pool to use but there's something I'm clearly not understanding here...

0 Comments
2024/11/05
23:42 UTC

1

Time Machine with Local SMB

Edit: I can't edit the title but I forgot to specify APPLE Time Machine, for people who don't know what that is just don't comment on this post, and/or don't use Macs.

I have a Debian 12 server with another internal HDD for Backups. I have the HDD formatted to ext4 (I don't know if that's important). I am hosting a Samba server. It has a share called "MacBook Backups" and it's normally visible when looking through Windows File Manager, and even Finder but it doesn't show up in the Time Machine "Choose Disk" menu at all.

3 Comments
2024/11/05
21:22 UTC

6

Where can I get a complete list of what goes in each of the three cloud-init files virt-install uses?

virt-install has a --cloud-init option that allows passing in cloud-init files on vm creation. ie:

virt-install --cloud-init \
   meta-data=/path/to/meta-data.yml, \
   user-data=/path/to/user-data.yml, \
   network-config=/path/to/network-config.yml \

I'm having a hard time finding out what goes in each of these three files.

I think I know what goes in network-config.yml:

version: 2
ethernets:
  enp1s0:
    addresses:
      - {{ NewVirtualMachineIPAddress }}/255.255.255.0
    routes:
      - to: default
        via: {{ DefaultGateway }} # Default gateway for IPv4
    nameservers:
      addresses: [{{ NameServers }}]

But I don't know:

(1) What goes in user-data.yml vs meta-data.yml?

(2) Where is a complete list of all the options that can be put in each file?

2 Comments
2024/11/05
06:01 UTC

5

isc-dhcp-server and tftp-server-address

My dhcpd.conf defines a subnet:

subnet 192.168.77.0 netmask 255.255.255.0 {

range 192.168.77.107 192.168.77.112;

option routers 192.168.77.95;

option tftp-server-address 172.18.0.3;

option bootfile-name "undionly.kpx";

}

I want to set up a docker container for PXE clients. The config seems OK, but tcpdump says nothing about 172.18.0.3
marko@malix:~$ sudo tcpdump -vv -n -i enp3s0 port 67

tcpdump: listening on enp3s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes

19:59:34.562725 IP (tos 0x0, ttl 20, id 0, offset 0, flags [none], proto UDP (17), length 576)

0.0.0.0.68 > 255.255.255.255.67: [udp sum ok] BOOTP/DHCP, Request from 00:16:36:f2:29:b2, length 548, xid 0x37f229b2, secs 4, Flags [Broadcast] (0x8000)

  Client-Ethernet-Address 00:16:36:f2:29:b2

  Vendor-rfc1048 Extensions

Magic Cookie 0x63825363

DHCP-Message (53), length 1: Discover

Parameter-Request (55), length 24:

Subnet-Mask (1), Time-Zone (2), Default-Gateway (3), IEN-Name-Server (5)

Domain-Name-Server (6), RL (11), Hostname (12), BS (13)

Domain-Name (15), SS (16), RP (17), EP (18)

Vendor-Option (43), Server-ID (54), Vendor-Class (60), BF (67)

Unknown (128), Unknown (129), Unknown (130), Unknown (131)

Unknown (132), Unknown (133), Unknown (134), Unknown (135)

MSZ (57), length 2: 1260

GUID (97), length 17: 0.67.78.70.54.52.51.53.77.57.77.0.22.54.242.41.178

ARCH (93), length 2: 0

NDI (94), length 3: 1.2.1

Vendor-Class (60), length 32: "PXEClient:Arch:00000:UNDI:002001"

19:59:34.563118 IP (tos 0x10, ttl 128, id 0, offset 0, flags [none], proto UDP (17), length 328)

192.168.77.100.67 > 255.255.255.255.68: [udp sum ok] BOOTP/DHCP, Reply, length 300, xid 0x37f229b2, secs 4, Flags [Broadcast] (0x8000)

  Your-IP 192.168.77.102

  Server-IP 192.168.77.100

  Client-Ethernet-Address 00:16:36:f2:29:b2

  Vendor-rfc1048 Extensions

Magic Cookie 0x63825363

DHCP-Message (53), length 1: Offer

Server-ID (54), length 4: 192.168.77.100

Lease-Time (51), length 4: 600

Subnet-Mask (1), length 4: 255.255.255.0

Default-Gateway (3), length 4: 192.168.77.95

BF (67), length 12: "undionly.kpx"

So the client gets its IP and the filename but no server's IP.

Similarly for port 69 (tftp):

marko@malix:~$ sudo tcpdump -vv -n -i enp3s0 port 69

tcpdump: listening on enp3s0, link-type EN10MB (Ethernet), snapshot length 262144 bytes

20:05:42.051117 IP (tos 0x0, ttl 20, id 2, offset 0, flags [none], proto UDP (17), length 58)

192.168.77.102.2070 > 192.168.77.100.69: [udp sum ok] TFTP, length 30, RRQ "undionly.kpxM-^?" octet tsize 0

So option tftp-server-address declaration seems not working at all, any ideas why?

The same checking I did inside my docker container - no packets ever received.

marko@malix:~$ sudo iptables -L

...

Chain DOCKER (2 references)

target prot opt source destination

ACCEPT tcp -- anywhere pxe-server tcp dpt:66

ACCEPT tcp -- anywhere pxe-server tcp dpt:67

ACCEPT tcp -- anywhere pxe-server tcp dpt:68

ACCEPT tcp -- anywhere pxe-server tcp dpt:69

...

INPUT & OUTPUT accepts all, FORWARD drops all.

5 Comments
2024/11/04
19:17 UTC

16

How do you extend a partition thats in between 2 partitions?

Hi, So here is the setup -

# fdisk -l /dev/sdb
Disk /dev/sdb: 258 GiB, 277025390592 bytes, 541065216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x003c03a4

Device     Boot     Start       End   Sectors  Size Id Type
/dev/sdb1            2048 209717247 209715200  100G 8e Linux LVM
/dev/sdb2       209717248 262146047  52428800   25G 8e Linux LVM
/dev/sdb3       262146048 314574847  52428800   25G 8e Linux LVM
/dev/sdb4       314574848 436207615 121632768   58G 8e Linux LVM

each of the partition has its own volume group. I want to extend /dev/sdb2,
How can i achieve this?

20 Comments
2024/11/04
18:10 UTC

4

Ubuntu launch error via virtual machine.

Hello,

I'm not familiar with Ubuntu at all and i'm not sure this is even the right t place to post this. I am using Oracle virtual box on MacOS and importing Ubuntu there to use it. This is for my 4th year uni project. However, when i try to launch Ubuntu i get the following error message and I'm not sure what it means or how to fix it.

Failed to open a session for the virtual machine Ubuntu.

|| || |Callee RC:|VBOX_E_PLATFORM_ARCH_NOT_SUPPORTED (0x80bb0012)|

Any suggestions or help would be appreciated.

9 Comments
2024/11/03
17:52 UTC

4

Like docker, create manually your own network namespaces

1 Comment
2024/11/02
22:30 UTC

9

Storing virtualmailbox directory in a nfs mount

do i just mount the nfs dir in /mnt/maildir and set mail location to /mnt/maildir or there is additional configurations ?

sudo mount -t nfs  -o sec=krb5 mailnfsstorage.com:/var/nfs/share /mnt/maildir
mail_location = maildir:/mnt/maildir    
5 Comments
2024/11/02
21:21 UTC

Back To Top