Welcome to the most active Linux Forum on the web.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 04-25-2010, 01:25 PM   #1
LQ Newbie
Registered: Apr 2010
Posts: 2

Rep: Reputation: 0
apg password without non-alphanumeric characters

I'm trying to get a password in a bash script for mysql user creation. But sometimes a get a non-alphanumeric character(s) in the password, and mysql failes with that.

I tryed with apg -EO0Il1`~!@#$%^&*()_+-=[]\;./{}|:"'<>? but failed.

I tryed with sed 's/[^a-zA-Z2-9]//g' , but at that moment the minimum password lenght failed.

I'm also fine when there is a better alternative then apg.
Thank you for helping.
Old 04-25-2010, 11:27 PM   #2
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,041
Blog Entries: 11

Rep: Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907Reputation: 907
Hi, welcome to LQ!

I didn't bother trying to understand your apg invocation, but:

why don't you just use
apg -MCLN -m 8
or replace 8 w/ however long you need your passwords.

1 members found this post helpful.
Old 04-26-2010, 04:41 AM   #3
LQ Newbie
Registered: Apr 2010
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks Tinkster. I got this answer via Aardvark to, and it helps!


bash, password

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
APG (Automatic Password Generator) very slow to answer jmcollin92 Linux - Security 2 05-23-2006 01:23 PM
how do u check if password has enough characters?? luxpops Programming 4 09-12-2004 04:30 AM
encrypted password 64 characters? uribo Programming 1 04-22-2003 07:51 AM
Is a Radeon 7500 apg x4 card easier to install than nvidia? pdmackenzie Linux - Hardware 7 03-26-2003 07:17 AM
Having Password Speciall Characters on the screen JStew Programming 4 02-11-2003 12:27 PM

All times are GMT -5. The time now is 11:31 AM.

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