LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-03-2017, 05:29 AM   #1
v_fone
Member
 
Registered: Feb 2009
Posts: 46

Rep: Reputation: 16
Enforce password in RHEL to start with letter


Hello!

I'm trying to secure my system and enforce every password user, even root, to begin with letter, I mean, the first character of the password must be letter (upper or lower case, it does not matter), do you know how can I configure it? is it possible?

Kind regards.

Last edited by v_fone; 02-03-2017 at 05:31 AM.
 
Old 02-03-2017, 05:44 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,836

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
it is definitely possible, but that will not secure anything.
here you can start: http://askubuntu.com/questions/15685...h-on-passwords
 
Old 02-03-2017, 05:51 AM   #3
v_fone
Member
 
Registered: Feb 2009
Posts: 46

Original Poster
Rep: Reputation: 16
Thanks pan64 for your help.

Well, I have used other constraints with pam but this one, a letter as a first character, I'm not able to find it, do you know how to do it?

Best regards.
 
Old 02-03-2017, 06:32 AM   #4
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,836

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
I'm afraid you need to implement your own pam_pwcheck module.
 
1 members found this post helpful.
Old 02-03-2017, 07:38 AM   #5
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Quote:
Originally Posted by v_fone View Post
I'm trying to secure my system and enforce every password user, even root, to begin with letter
Which statistically makes your system LESS secure.
 
2 members found this post helpful.
Old 02-03-2017, 08:18 AM   #6
hydrurga
LQ Guru
 
Registered: Nov 2008
Location: Pictland
Distribution: Linux Mint 21 MATE
Posts: 8,048
Blog Entries: 5

Rep: Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925Reputation: 2925
Quote:
Originally Posted by v_fone View Post
Hello!

I'm trying to secure my system and enforce every password user, even root, to begin with letter, I mean, the first character of the password must be letter (upper or lower case, it does not matter), do you know how can I configure it? is it possible?

Kind regards.
Out of interest, why?
 
Old 02-03-2017, 11:06 AM   #7
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
If you know that there are only 26 * 2 possibilities for the first character of the password, that's theoretically a lot of possibilities to remove. It also makes it very likely that it's a dictionary word.

Attempts to impose password limits also greatly simplify dictionary attacks because there are now many thousands of words that you don't need to try because you know they're too short or too long.
 
1 members found this post helpful.
Old 02-03-2017, 11:13 AM   #8
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Possible? Yes. You will have to literally make a custom pam module.

Possible with default PAM and Cracklib? No.

Good Idea? Absolutely not, for many reasons mentioned above.
 
Old 02-03-2017, 02:25 PM   #9
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
instead of a easy guessed letter

why not use the length
min is 12 and max is 256 and use a phrase
-- not these!!!
" ToBoldlyGoWhereWhereNoOneHas"
" ToBeOrNotToBe"
" ItWas_a_DarkAndStormyNight"

long and hared to crack and EASY TO REMEMBER!!!!
!!! no Post-it-notes" stuck to the screen !!!!
 
Old 02-04-2017, 11:15 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,836

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Quote:
Originally Posted by John VV View Post
!!! no Post-it-notes" stuck to the screen !!!!
actually I do not know any virus (or other software) which can read the post it notes...
 
Old 02-07-2017, 07:45 AM   #11
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
Although there is precious little entropy in any password, a fairly good technique is to use a phrase.

hddtmrutc is remembered by: "Hickory, Dickory, Dock. The mouse ran up the clock."

yykeenpek can be remembered the same way.

Last edited by sundialsvcs; 02-07-2017 at 08:20 AM.
 
Old 02-07-2017, 07:59 AM   #12
r3sistance
Senior Member
 
Registered: Mar 2004
Location: UK
Distribution: CentOS 6/7
Posts: 1,375

Rep: Reputation: 217Reputation: 217Reputation: 217
When you push arbitrary things like this, they tend to be inconsistent with other systems which leads to your users getting password fatigue and in turn, turning to bad practices such as writing down passwords on paper. I'd say stick with the sensible defaults here and just force a longer password or phrase.

Quote:
Originally Posted by sundialsvcs View Post
hddtmrotc is remembered by: "Hickory, Dickory, Dock. The mouse ran up the clock."
I think you have a little typo in there, or was switching u for an o intentional?
 
Old 02-07-2017, 08:20 AM   #13
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939Reputation: 3939
It was, indeed, onintentiunal.
 
Old 02-08-2017, 05:37 AM   #14
ledgescha
LQ Newbie
 
Registered: Feb 2017
Location: Ahmedabad
Posts: 1

Rep: Reputation: Disabled
After configuring these settings, Still machine is not asking for complex password or minimum length.I had applied these configuration on RHEL 6.2x 64 bit. Please suggest
 
Old 02-08-2017, 06:51 PM   #15
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,624

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
hi ledgescha

instead of hijacking a thread it might be better to start a new thread
also 6.2 is a bit OLD
the current minor release of the older 6 series is RHEL 6.8
you are 6 versions and about 4 years out of date

also this is redhat and you DO ??? have the required paid for support contract, right ?

your FIRST stop on the net SHOULD be the redhat site

login with the credentials that were set up with the REQUIRED license / support contract and do a search
-- you will need to be loged in to read most of the knowledge base results
 
  


Reply



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
How to check if root password and grub password is same or not on RHEL 7 . khpr0502 Linux - Security 3 09-21-2015 09:36 AM
Customized Password policy enforce akhlaqur Linux - Security 1 12-30-2013 05:27 AM
Password Restrict.. Password History in RHEL 5.0 your_shadow03 Linux - Newbie 6 08-14-2008 10:33 AM
Script to move directories based on first letter to a new directory of that letter tworkemon Linux - Newbie 8 01-30-2007 07:18 PM
Whats's this letter saying?MS is going to start using linux, or wish it didn't exist? colinstu General 2 11-04-2006 11:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 03:46 AM.

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