LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-22-2017, 07:08 PM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Rep: Reputation: 174Reputation: 174
Which process/program processes /etc/crypttab


CentOS 7.3

I have 4 encrypted partitions/drives in my server which I unlock and mount at boot time by defining mappers in /etc/crypttab and using a key file. The unlocked file systems are mounted with entries in /etc/fstab. Here are examples
Code:
/etc/crypttab
secret18.0a  /dev/disk/by-uuid/5828d371-db06-4123-9c07-943ed4efe423 /root/keyfile luks

/etc/fstab
/dev/mapper/secret18.0a  /media/data18.0a  ext4 defaults 0  1
I am trying to track down where this activity fits in systemd. I have not found the /etc/crypttab file referenced in any systemd scripts so I need to know what program is processing the file. Any ideas?

TIA,

Ken
 
Old 01-22-2017, 08:12 PM   #2
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
"man systemd-cryptsetup-generator"
 
Old 01-22-2017, 08:38 PM   #3
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 2,127

Original Poster
Rep: Reputation: 174Reputation: 174
Thanks syg00,

Very interesting read. I never heard of unit generators before. The key point I came away with is that they operate "very early at bootup." That leads me to believe that I will need to replace the /etc/crypttab approach with something home made.

What I am trying to achieve is to unlock the partitions using a key file which resides on a flash drive. If the flash drive or key is not present the system would not try to unlock the partitions nor mount the file systems. As unlocking occurs before mounting per /etc/fstab and the usb flash drive would be mounted by /etc/fstab which takes place after the key file would be needed... Not a path to success.

I have a script which will detect the appropriate flash drive, mount it, check for the key file and if present unlock and mount the drives then unmount the flash drive. I guess I need to figure out how to fit this into the systemd scheme of things instead of relying on /etc/crypttab and /etc/fstab.

Ken
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kill zombie process via C program without killing main process aj1991 Linux - Newbie 3 04-17-2015 12:04 PM
can one process ocupy the whole cpu while other processes are idle? exceed1 Linux - Hardware 4 12-02-2010 04:57 PM
Display processes % usage but I only want the process name and % used evansd321 Linux - General 2 09-14-2010 06:24 AM
Optimum number of processes for process chamila1986 Linux - Newbie 5 10-25-2009 02:26 AM
sort active processes and show every process once jianelisj Linux - Newbie 15 03-08-2008 04:50 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration