LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris, OpenSolaris, OpenIndiana, and illumos.
General Sun, SunOS and Sparc related questions also go here. Any Solaris fork or distribution is welcome.

Notices


Reply
  Search this Thread
Old 04-30-2008, 01:08 PM   #1
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Rep: Reputation: 30
Question regarding a password policy setting


Hi,

In what directory does this command write to below?

# passwd -x 30 -n 1 -w 5 user_name

I want to view the directory so I would make sure that this command has taken into effect...

So, I would change my password every 30 days, password history being 1 day, and warning would be 5 days before changing password.

Thanks.
 
Old 04-30-2008, 01:10 PM   #2
ncsuapex
Member
 
Registered: Dec 2004
Location: Raleigh, NC
Distribution: CentOS 2.6.18-53.1.4.el5
Posts: 770

Rep: Reputation: 44
not sure what you are asking..


but 2 main password files to check are

/etc/passwd
/etc/shadow
 
Old 04-30-2008, 11:15 PM   #3
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
After issueing this command, I need to know which directory does it save it to.
Hope this may help.

Thanks.
 
Old 04-30-2008, 11:28 PM   #4
madivad
Member
 
Registered: Jan 2007
Posts: 70

Rep: Reputation: 15
Quote:
Originally Posted by ncsuapex View Post
/etc/passwd
/etc/shadow
Run the following test:

1) assume 'john' is your username
2) grep john /etc/shadow

you will see a hash value

do it again, you will see the same value

3) passwd
and change your password (or not, you can retype the same password even)

issue line 2 again, you will see a new hash

What is strange to note though, and I had never realised this before now, is that the hash changes, even if the password doesn't!

The password CAN be stored in the /etc/passwd file as well, so you could also check to see if you see a hash in it, by issuing:

4) grep john /etc/passwd

If you see an 'x' after your name (eg: 'john:x:') that means the password shadow file is used. There are other meaningful exressions in that field, but there also may be the hash itself.

google passwd shadow and have a look around
 
Old 04-30-2008, 11:33 PM   #5
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
OK, all I need to know whether the 30 day password limit has taken in effect or not.
So does this test will determine this?

However, I can set the same command to change passwd every 1 day....to test....
That may be easier and see whether the system prompts me to change it after 1 day of use.

I may try that option.
 
Old 04-30-2008, 11:37 PM   #6
madivad
Member
 
Registered: Jan 2007
Posts: 70

Rep: Reputation: 15
in that case, read this, the answer lies within

http://tldp.org/LDP/lame/LAME/linux-...e-formats.html
 
Old 05-01-2008, 12:28 AM   #7
as400
Member
 
Registered: Apr 2004
Location: USA
Distribution: Solaris 10 (x86) and Windows XP Pro SP2
Posts: 596

Original Poster
Rep: Reputation: 30
Thanks I will read this.
 
Old 05-03-2008, 02:26 PM   #8
coolster
Member
 
Registered: Nov 2007
Distribution: Solaris 10, Solaris Nevada
Posts: 112

Rep: Reputation: 15
Quote:
Originally Posted by as400 View Post

In what directory does this command write to below?

# passwd -x 30 -n 1 -w 5 user_name
In a standard installation of Solaris Nevada Build 82 the command is saved in /etc/shadow.

I tested it like this:

#useradd -d /export/home/test -m -s /bin/bash test

#passwd test
New Password:
Re-enter new Password:
passwd: password successfully changed for test

/etc/shadow looks like this:
test:OnaOHGpeGVFbI:14002::::::

Then I issued:
# passwd -x 30 -n 1 -w 5 test

At the bottom of /etc/shadow file I find:
test:OnaOHGpeGVFbI:14002:1:30:5:::


Hope this is what you 're looking for.
Regs, C

Last edited by coolster; 05-03-2008 at 02:32 PM. Reason: typoh
 
  


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
password policy Nick Pontelando Linux - Security 9 08-15-2012 09:50 AM
How to set the password policy and lockout policy bin_shell Linux - Security 4 03-24-2010 03:30 PM
Password policy sunhui Linux - Software 2 05-12-2006 03:19 AM
password policy ust Linux - Software 0 12-05-2005 12:44 AM
Implementing password policy ddaas Linux - Security 3 12-31-2004 02:02 PM

LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris

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