[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


No need to change password

Posted on 2005-05-06
Medium Priority
Last Modified: 2013-12-27
Hi All,

I am using Sun OS 5.1.

Now some users will prompt to change password every 90days.
Can I run a command to disable this feature. ie. all users will not prompt to change passwd every days and they can still login with the old password.

Question by:ee_lcpaa

Accepted Solution

thaanum earned 1000 total points
ID: 13947999
Yes,  for a given "user":

# passwd -x -1 user

   will disable password aging for a user, and keep current password intact.

You should also take a look at the file /etc/defaults/passwd
   and see what the MAXWEEKS=   is set to.
   if it has a value, like MAXWEEKS=12  ,   then remove the value, leaving the value blank, like
   MAXWEEKS=          , and that will disable password aging for everyone.

LVL 10

Expert Comment

ID: 13955609

>> I am using Sun OS 5.1.

Really ? That would be Solaris 2.1 which was current back in 1994. I could image you are using SunOS 5.5.1 (around 1997), not 5.1. Can you confirm this ?

If you are really using 5.1, then I'm not sure if we already had a /etc/shadow-file at that time, and therefore the passwd as proposed by thaanum may not work. In this case, only go for /etc/default/passwd.

If you are using 5.5.1 you may use the following script to do it on all users:

while read a b
passwd -x -1 $a
done </etc/passwd

(suppose you are not using NIS or NIS+)

LVL 48

Expert Comment

ID: 13955705
Solaris 2.x has always had /etc/shadow, however my memory doesn't extend back far enough to remember if the passwd command has the -x feature.  I'm pretty sure this came in later versions of Solaris.

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A metadevice consists of one or more devices (slices). It can be expanded by adding slices. Then, it can be grown to fill a larger space while the file system is in use. However, not all UNIX file systems (UFS) can be expanded this way. The conca…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Suggested Courses
Course of the Month20 days, 3 hours left to enroll

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question