Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/python
- # Name get_luks_pass
- # author codegazer
- # written 2019_06_03
- # Purpose Prompt user for LUKS encryption pass phrase. Loop until both match.
- import sys
- import os
- from getpass import getpass
- print("LUKS encryption pass phrase: note once set this cannot be changed.")
- print("Do not forget the LUKS pass phrase. It cannot be recovered.")
- print("")
- LUKSpass = "one"
- LUKSpass_again = "two"
- while LUKSpass != LUKSpass_again :
- LUKSpass = getpass("Please enter LUKS pass phrase for disk encryption: ")
- LUKSpass_again = getpass("Please enter LUKS pass phrase again: ")
- if LUKSpass != LUKSpass_again :
- print("no match, try again")
- else :
- print("match OK")
- break # out of while loop
- print("LUKS pass is: "+str(LUKspass))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement