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 05-17-2007, 10:04 PM   #1
utahnix
Member
 
Registered: Dec 2006
Location: Utah, USA
Distribution: openSUSE
Posts: 72

Rep: Reputation: 15
How to change password requirements


I want to change the password requirements for system users. I would like to know how to (a) tighten password restrictions, and (b) loosen password restrictions (i.e. disable password complexity checks).

I know in Windows, you do this by changing the local security policy. But I have no clue how to do this on Linux.
 
Old 05-17-2007, 11:28 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Yast2 -> Security and Users -> Local Security -> Custom -> Password Settings.

Also look at "man pam_cracklib". There you can fine tune the complexity that passwords require.
 
Old 06-01-2007, 05:56 PM   #3
utahnix
Member
 
Registered: Dec 2006
Location: Utah, USA
Distribution: openSUSE
Posts: 72

Original Poster
Rep: Reputation: 15
Okay...

I've seen that stuff in Yast, but Yast is distro specific, and I prefer to know how to do things in Linux without the distro-specific commands. I don't like being tied to tools that don't exist on most or all other distros.

I'll check out the man pages you have specified...
 
Old 05-01-2008, 12:28 PM   #4
kah00na
LQ Newbie
 
Registered: Aug 2006
Posts: 7

Rep: Reputation: 0
Look in /etc/login.defs. Maybe that is what you're looking for.
 
Old 05-01-2008, 01:24 PM   #5
utahnix
Member
 
Registered: Dec 2006
Location: Utah, USA
Distribution: openSUSE
Posts: 72

Original Poster
Rep: Reputation: 15
That helps (good to know), but I would like to edit password complexity requirements. My /etc/login.defs doesn't have anything about password complexity.

Is that something that can be added to this file? This is something I know nothing about (never edited login.defs before)
 
Old 05-01-2008, 02:16 PM   #6
DotHQ
Member
 
Registered: Mar 2006
Location: Ohio, USA
Distribution: Red Hat, Fedora, Knoppix,
Posts: 548

Rep: Reputation: 33
Are you using the PAM security module?
cat /etc/pam.d/system-auth

that file will have many of the rules for pwords.
You'll see pam cracklibs and such for pword strength etc.

chage sets how often a user has to change the pword and prevents them from changing it to soon.

sshd_config controls ssh sesions only but you can prevent root logins and set max tries and stuff like that in there. (/etc/ssh/sshd_config or it might be /usr/local/etc/sshd_config

Last edited by DotHQ; 05-01-2008 at 02:17 PM.
 
Old 05-01-2008, 03:17 PM   #7
utahnix
Member
 
Registered: Dec 2006
Location: Utah, USA
Distribution: openSUSE
Posts: 72

Original Poster
Rep: Reputation: 15
I've played around with sshd_config, and yes, I've already restricted root logins

Concerning pam... I've fiddled with pam, but not much. In this instance, however, I haven't touched anything. It's using the default authentication that comes with SLES/openSUSE.

My passwd file in /etc/pam.d contains the following:

#%PAM-1.0
auth include common-auth
account include common-account
password include common-password
session include common-session
 
  


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
change Root Password even if the password in the grub is also set sheelnidhi Linux - General 6 08-30-2006 07:27 AM
how to change rpm's requirements field polrus Linux - Software 1 05-10-2005 11:35 AM
Password requirements jonfa Linux - Security 2 05-07-2005 03:14 PM
How can I change e-mail password(or linux account password) with php in website?? yusuf Programming 1 05-28-2004 09:39 AM

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

All times are GMT -5. The time now is 12:12 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