26
Thu, Dec
0 New Articles

TechTip: Passwords Are Key to AIX Security

Security - Other
Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Ensure that your users have strong passwords.

 

Within any operating system, password maintenance is an important system admin task, and AIX is no different. So let's look at some password maintenance techniques.

 

Within AIX, you can specify rules in password administration. The most common ones are these:

  1. Password length, setting the minimum and maximum character length
  2. Amount of repeating characters
  3. Expiry date of the account
  4. The number of previous passwords that cannot be reused
  5. The number of characters in the previous password not to be used in the new password
  6. The number of non-alpha and alpha characters that must be used in the password
  7. The number of weeks before a password is expired

 

In the following examples, our user will have the name "alpha."

 

To enforce a password change upon the next login session, use the pwdadm command, which is used to administer user passwords:

 

 # pwdadm -f ADMCHG alpha

 

Now, when user alpha tries to login, he is forced to change his password, like so:

 

login: alpha

alpha's Password:

[compat]: 3004-610 You are required to change your password.

        Please choose a new one.

alpha's New password:

 

You can query the pwdadm settings using the q flag:

 

pwdadm -q <user>

 # pwdadm -q alpha

alpha:

        lastupdate = 1310489962

        flags = ADMCHG

 

In the above output, the lastupdate attribute reflects in epoch time (total seconds) when a change was issued via pwdadm or, more typically, when the password was last changed. To convert this to a more meaningful date format, we could use perl:

 

# perl -e 'print scalar(localtime(1310489962)), "\n"'

Tue Jul 12 17:59:22 2011

 

To bypass any password- rule checking that is currently set on a user, use pwdadm with the NOCHECK flags:

 

# pwdadm -f NOCHECK alpha

# pwdadm -q alpha

alpha:

        lastupdate = 1310490666

        flags = NOCHECK

 

To reset the user's password attributes to the default (by that, I mean to clear the current password flags set by the pwdadm command), use the c flag:

 

# pwdadm -c alpha

 

Then query the user to check:

 

# pwdadm -q alpha

alpha:

        lastupdate = 1310492513

 

To make the user alpha change his password in three weeks time, use the maxage attribute with the chuser command. The following will ensure that user alpha will need to change his password in three weeks:

 

# chuser maxage=3 alpha

 

This change can be confirmed using the lsuser command and extracting the maxage attribute:

 

# lsuser -a maxage alpha

alpha maxage=3

 

To actually determine the date/time of user alpha's next password change, we need to do a little arithmetic involving the number of seconds. We know that there are 86,400 seconds in a day. The password change has been set to three weeks (as demonstrated earlier), so we need to work out how many seconds there are in three weeks ( 21 days):

 

 # expr 86400 \* 21

1814400

 

We also know that the last password change was 1310492513. So add these two figures (last password change time value +three weeks time value), and we get this:

 

# expr 1310490666 + 1814400

1312305066

 

Now convert to normal time with perl:

 

# perl -e 'print scalar(localtime(1312305066)), "\n"'

Tue Aug  2 18:11:06 2011

 

We can now see that user alpha's next password change or expire will be on Tuesday, August 2.

 

If we wanted to change the length of the password that should be given when changing a password, we can use the minlen attribute, like so:

 

# chuser minlen=8 alpha

 

Now if user alpha changes his password and gives a password length less than eight characters, the system will return an error:

 

$ whoami

alpha

$ passwd

Changing password for "alpha"

alpha's Old password:

alpha's New password:

 

3004-603 Your password must have:

        a minimum of 8 characters in length.

 

If you need to change a lot of users' passwords yourself, it can be quite time-consuming going to each user's account and changing the password. A more efficient approach is to use the chpasswd command to automatically change users' passwords. This has its advantages as it can be used within a script if required. Here's the format:

 

user : password | chpasswd

 

To change user alpha's password to dongle201 from the command line, I could use this:

 

# echo "alpha:dongle201"| chpasswd

 

If I wanted to clear the password flags—that is, not force user alpha to change his password at the next login and instead use the current one now being set—I could use this:

 

# echo "alpha:dongle201"| chpasswd -c

 

To change many users' password at once, create a file, with the following format:

 

user1:password1

user2:password2

….

 

Then pipe that file through chpasswd. For example:

 

# cat pass

alpha:Pipered90

bravo:LookHtw

 

# cat pass | chpasswd

 

Of course, you will have to notify the users of the password change!

Stay Safe!

Ensuring that your users have strong passwords is truly one of the easiest steps toward system integrity. Take advantage of these techniques and sleep better tonight knowing that you've just made your company's system and data more secure.

pseries, ibm, power systems

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: