You are not authorized to post comments.

Unix tip: Password complexity for users

By Sandra Henry-Stocker  Add a new comment

On older Solaris systems, you would only see a few tunable parameters for controlling passwords. MINWEEKS determined the number of weeks that a user was required to keep his password. MAXWEEKS determined how many weeks could go by before he was forced to change it. And PASSLENGTH, of course, determined the minimum number of characters a password had to have to be accepted by the system. These settings limited the time that a user could keep a password and potentially kept him from changing his password on expiration and immediately changing it back to its original setting.

These settings are stored in several fields of the /etc/shadow file. The record below, for example, shows a password which just recently expired. It was last changed a little over a month ago (date), but was set to expire after 28 days (max). The user was prevented from changing his password within two weeks of setting it (min).

shs:K6be11OCyAwAY:14355:14:28::::
                   ^    ^   ^
                   |    |   |
                  date min max

These settings might look like this in the /etc/default/passwd file:

MAXWEEKS=4
MINWEEKS=2
PASSLENGTH=6

Beyond this, the passwd command required that users include at least two letters and at least one number of special character. If a user trying to change his password didn't follow these rules, he would see a message such as this one:

passwd: The first 6 characters of the password must contain at
least two alphabetic characters and at least one numeric or
special character.

Solaris 10 offers a suite of settings that provide a lot more control over users' password choices. These settings, stored in the /etc/default/passwd file, allow you to your own rules.

On installation, the /etc/default/passwd file on a Solaris 10 system will have this group of settings all commented out.

#MINDIFF=3
#MINALPHA=2
#MINNONALPHA=1
#MINUPPER=0
#MINLOWER=0
#MAXREPEATS=0
#MINSPECIAL=0
#MINDIGIT=0
#WHITESPACE=YES

These settings give you a lot of control over how passwords are set. The fields are used like this:

MINDIFF - Defines the minimum number of differences required between old and new passwords. If not set, it defaults to 3.
MINALPHA - Defines the minimum number of alphabetic characters. If not set, it defaults to 2.
MINNONALPHA - Defines the minimum number of non-alphabetic characters. In other words, digits and special characters. The default is one.
MINUPPER and MINLOWER - Define the minimum number of uppercase and lowercase characters required. Both default to 0. In other words, we might still require letters, but their case is not evaluated unless one of these settings is used.
MAXREPEATS - Determines the number of times you can consecutively use the same character (e.g., 111 or xxx). This is not checked by default.
MINDIGIT - Determines how many digits are required. If not set, no digits are required. However, we still likely have a MINNONALPHA setting, so one digit or one special character is likely required.
MINSPECIAL - In similar manner to MINDIGIT, MINSPECIAL determines how many special characters are needed and defaults to none.
WHITESPACE - Determines whether whitespace characters (blanks and tabs) are allowed.

We still have the MAXWEEKS and MINWEEKS settings and also the PASSLENGTH that earlier versions of Solaris include.

The Solaris 10 /etc/default/passwd file also contains a setting for NAMECHECK. This is the setting that allows or disallows passwords which are the same as or a circular shift of the username. This is not new, you say? Ah, yes, you're right. What is new is that this allows you to turn this checking off. Not that you'd want to, but you can if you are so inclined.

There's also a WARNWEEKS setting that can be used to determine when a user will be warned about when his password will expire. You might, for example, want to warn him a week or two ahead of time.

The other new and interesting setting is one called HISTORY. This setting allows you to prevent the user from repeating passwords. You set a depth, say 8, which would mean that the system would "remember" the user's last eight passwords and would not allow a new password to be a repeat of any in this set. The passwords themselves are kept in hash form in a file called /etc/security/passhistory. It might look something like this:

shs:bwQb4CuIarli2:EuFLxSrsGyKg2:stzheFITH4.s.:K6be13OCyAmAY:jYLCn8bqEqBCg:DBQRGX
Twtp5as:9EpFTsPvStZhQ:v7LCXZDyav.DI:JPPDCsc4W6BsU:MN9D4nIR/TemU:MNGBAL/xYFQm2:

Now, how clever is that? Maybe we'll finally outsmart our more stubborn users.

ITworld LIVE

IT Management/StrategyWhite Papers & Webcasts

White Paper

The Cloud: Reinventing Enterprise Collaboration

Collaboration and content sharing are not, of course, new concepts. But cloud computing has changed the nature of collaboration, content sharing, document storage and project management to enable more efficient, faster-acting and cost-effective enterprises. According to a new study by IDG Research, the vast majority of knowledge workers (86%) placed a very high level of importance on collaborating with internal coworkers and external stakeholders, and having access to the most up-to-date corporate information. Read how organizations are realizing massive productivity gains by transitioning their content management solutions to cloud-based models.

White Paper

Empowering Your Mobile Worker

Today's most productive employees are mobile, and your company's IT strategy must be ready to support them with 24/7 access to the business information they need across a range of mobile devices.See how corporations are meeting the many needs of their mobile workers with the help of Box.

White Paper

Market Landscape Report: Online File Sharing and Collaboration in the Enterprise

The trend toward "consumerization" marches onward in IT; more and more end-users are choosing their own hardware plaforms and software applications in lieu of the IT-sanctioned business tools provided by their companies. These end-users are looking to tackle issues like data sharing, portability, and access from multiple intelligent endpoint devices, creating a conundrum for IT as it needs to balance business enablement, ease of access, and collaborative capacity with the need to maintain control and security of information assets. This need for balance is one of the drivers of the fast growing online file sharing and collaboration segment of the SaaS market. This paper examines the market drivers, inhibitors, and top vendors in this segment, including Box, Citrix Sharefile, Dropbox, Egnyte, Nomadesk, Sugarsync, Syncplicity and YouSendIt.

White Paper

Sharing Simplified - Consolidating File-sharing Technologies

Employees need to share content with colleagues within their organization and outside. Yet, ECMs make it hard to share content within a business and impossible between organizations. Read how one company consolidated multiple file sharing technologies to increase productivity and reduce complexity.

White Paper

Content Sharing 2.0: The Road Ahead

A growing number of companies are taking advantage of the natural synergies that exist between cloud-based IT services and content access and sharing. Legacy content management and collaboration systems simply weren't designed to meet the evolving requirements of today's IT and business managers, as well as the needs of content users. Box provides cloud-based content storage, access and collaboration services that require virtually no user training and supports file access and delivery on almost all popular PC and mobile devices. Read how Box let companies rapidly implement a cost-effective and secure content storage and sharing system that can easily expand to accommodate any size and number of files.

See more White Papers | Webcasts

Ask a question

Ask a Question