LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Other *NIX Forums > Solaris / OpenSolaris
User Name
Password
Solaris / OpenSolaris This forum is for the discussion of Solaris and OpenSolaris.
General Sun, SunOS and Sparc related questions also go here.

Notices

Reply
 
Search this Thread
Old 11-05-2012, 10:56 AM   #1
marcus1
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Rep: Reputation: Disabled
Exclamation Check if all passwords are shadowed in a script


I need to write a bash script in Solaris 10 that checks if all passwords are shadowed.

If they are shadowed, print "Exception: NO", if they aren't, print "exception:Yes".

The problem here is how do i go about checking that all my passwords are shadowed?

Also, what commands can i use for the script?

I know i can use if else, awk, grep but my knowledge only extends to simple awk and grep.

Much Thanks.
 
Old 11-05-2012, 02:33 PM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
Please clarify what a non shadowed password would be. Starting from Solaris 7, /etc/password no more store the password hash.
 
Old 11-05-2012, 07:10 PM   #3
marcus1
LQ Newbie
 
Registered: Nov 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
I think it means that all passwords in /etc/passwd are stored/encrpyted in /etc/shadow too.

Yea i know the phrasing's a little weird :/
 
Old 11-06-2012, 12:48 AM   #4
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris10, Solaris 11, Mint, OL
Posts: 9,490

Rep: Reputation: 355Reputation: 355Reputation: 355Reputation: 355
All /etc/password user's passwords are stored in /etc/shadow and not in the former file by design.
Run pwconv if someone manually put some passwords in /etc/passwd.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
System, Video Bios Shadowed primenu Linux - Hardware 1 01-06-2010 05:06 PM
Minimum required to check passwords against Windows AD? rimtrim Linux - Server 5 06-10-2009 08:15 AM
LXer: Linux check passwords against a dictionary attack LXer Syndicated Linux News 0 12-27-2006 04:03 AM
removing the dictionary check when changing passwords da_kidd_er Linux - Security 2 11-11-2004 05:35 AM
Suse 9 and Shadowed passwords shoombool_tala Linux - Security 4 04-14-2004 03:59 AM


All times are GMT -5. The time now is 09:36 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration