Linux Security Forum
 
 

Go Back   Linux Security Forum > Security Forums > Security Software

Notices

Security Software This forum is for security related software. Ex. monitoring software, IDS/IPS software, logging software, server based firewalls, etc.

Reply
 
Thread Tools
  #11  
Old 09-05-2008
Raston Warrior Raston Warrior is offline
Newbie
 
Join Date: Sep 2008
Posts: 10
Rep Power: 0
Raston Warrior is on a distinguished road
Default CentOS

Hi there!

--
Found key of size 1
Trying to generate a strong key (> 2000 characters)
cut: option requires an argument -- d
Try `cut --help' for more information.
./lukstool: line 168: =: command not found
--

I tested it from the CentOS live CD - worked perfectly, specifically this part..? It's looping because it's striving to find a key of appropriate length and will keep trying, but the keygen routine is faulting.

First thing to check - do you have uuencode? If you don't it'll try to create a key with binary characters which it won't take unless you write it to a file first; I don't want the password to ever hit the hard disk, so I'm using uuencode to ensure the characters are all ANSII.

What are the results of 'lukstool runcheck'?

- Raston
Reply With Quote
  #12  
Old 09-05-2008
drendeah drendeah is offline
Super Moderator
 
Join Date: Jul 2008
Posts: 295
Blog Entries: 1
Rep Power: 101
drendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond repute
Default Re: LUKS bash script creates true multifactor authentication

I found a problem with my sudoers file and I had to add some modules in, but it still gives the same error:
Try `cut --help' for more information.
./lukstool: line 168: =: command not found
Found key of size 1
Trying to generate a strong key (> 2000 characters)
cut: option requires an argument -- d
Try `cut --help' for more information.
./lukstool: line 168: =: command not found
Found key of size 1

[test@xen01 ~]$ ./lukstool runcheck
This script was designed on OpenSuSE and BASH - this routine will help verify compatibility with
your particular system. Make sure you review the filesystem and blocksize preferences prior to running.
You need to run 'lukstool make' as root - make sure you can do so. Proceeding..
ReiserFS not found, but filesys correctly set to ext3 - moving on..
Testing complete, looks good. You should be able to use this script without grief.
[root@xen01 ~]# which uuencode
/usr/bin/uuencode
Reply With Quote
  #13  
Old 09-05-2008
Raston Warrior Raston Warrior is offline
Newbie
 
Join Date: Sep 2008
Posts: 10
Rep Power: 0
Raston Warrior is on a distinguished road
Default strongkey routine

Hmm, Okay - that's not expected..

strongkey=$(head -c 20$total /dev/urandom | uuencode -m - | grep -v "begin-base64 644 -" | grep -v "====" | cut -d "=" -f1)

let's break this down - the strongkey var is the result of the first 2000-ish bytes off of /dev/urandom, which is binary. That's coded by uuencode, and with the -m switch that puts it to base64, and the upper and lower strings are stripped so as to ensure there are no consistent characters (everything in output is nothing but random, always). The cut statement make sure the output is clean, but that's what's complaining - either uuencode isn't outputting as expected or cut is misbehaving.

I'll pull up CentOS on a VM and mess with it; perhaps there's a more universal means of outputting the data we need..

- Raston
Reply With Quote
  #14  
Old 09-06-2008
Raston Warrior Raston Warrior is offline
Newbie
 
Join Date: Sep 2008
Posts: 10
Rep Power: 0
Raston Warrior is on a distinguished road
Default ditching uuencode

I was considering a way to do this without uuencode a little bit ago 'just because', and figure this is the perfect time to do it. The new genkey routine is more CPU intensive and as a result takes longer, but the results remain excellent and the routine will be more compatible across the board.

I've run the newest version on a CentOS VM and it worked perfectly - please download the latest update at 'http://www.death-zone.org/luks/luksfile' and see if that resolves what you ran into.

- Raston
Reply With Quote
  #15  
Old 09-06-2008
drendeah drendeah is offline
Super Moderator
 
Join Date: Jul 2008
Posts: 295
Blog Entries: 1
Rep Power: 101
drendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond reputedrendeah has a reputation beyond repute
Default Re: ditching uuencode

Quote:
Originally Posted by Raston Warrior View Post
I was considering a way to do this without uuencode a little bit ago 'just because', and figure this is the perfect time to do it. The new genkey routine is more CPU intensive and as a result takes longer, but the results remain excellent and the routine will be more compatible across the board.

I've run the newest version on a CentOS VM and it worked perfectly - please download the latest update at 'http://www.death-zone.org/luks/lukstool' and see if that resolves what you ran into.

- Raston
Thanks! That worked.
Reply With Quote
  #16  
Old 09-06-2008
Raston Warrior Raston Warrior is offline
Newbie
 
Join Date: Sep 2008
Posts: 10
Rep Power: 0
Raston Warrior is on a distinguished road
Default Re: LUKS bash script creates true multifactor authentication

Great! Glad to hear - please use and abuse it and let me know if you run into anything, have questions, enhancement requests, etc.

- Raston
Reply With Quote
Sponsored Links
Reply

Bookmarks

Tags
bash, luks, multifactor, script

Thread Tools

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 On
HTML code is Off
Forum Jump

Photobucket
All times are GMT -5. The time now is 09:10 AM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Advertisement System V2.3 By   Branden