Use the following linux command to display the contents of several files with their filenames prepended.
tail -n +1 file1.txt file2.txt file3.txt
==> file1.txt <==
File 1 contents
==> file2.txt <==
File 3 contents
==> file3.txt <==
File 3 contents
Remove comments and empty lines with grep
grep -v -e ^# -e ^$ filename
- Install libpam-radius-auth
sudo apt-get install libpam-radius-auth
- Configure libpam-radius-auth with your radius servers and secrets
sudo pico /etc/pam_radius_auth.conf
- Set permissions on /etc/pam_radius_auth.conf
sudo chmod 0600 /etc/pam_radius_auth.conf
auth sufficient pam_radius_auth.so to
/etc/pam.d/login and then the following as desired just above the line reading @include common-auth
- Add try_first_pass to auth line in /etc/pam.d/common-auth
auth [success=1 default=ignore] pam_unix.so nullok_secure try_first_pass
- Make user locally with disabled password
sudo useradd -m USERNAME
or to add a user and add to the sudo group
sudo useradd -m -G sudo USERNAME
The one caveat that I’ve found with this is that when logging in with local users to the local console you are prompted for a password twice, this is fixed via step 5 but note that if you run pam-auth-update this change will be overwritten.
WARNING! Backup your data before proceeding!
For me this process didn’t destroy the data. I completely expected it to, but it didn’t. Make sure you backup in case you’re not as fortunate.
Move into Single Users Mode
sudo init 1
Unmount partition in question
sudo umount /mnt/disk1
Launch PartEd pointing at the disk in question
sudo parted /dev/sdb
Make the Partition Table GPT
Accept the warning and quit PartEd
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue?
Check the disk (resize2fs required this before it would resize the partition)
sudo e2fsck -f /dev/sdb1
Resize the partition to fill the total available disk space
sudo resize2fs /dev/sdb1
Mount the disk again
sudo mount /mnt/disk1
And hey presto!