Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Red Hat
User Name
Red Hat This forum is for the discussion of Red Hat Linux.


  Search this Thread
Old 12-11-2003, 08:52 PM   #1
LQ Newbie
Registered: Dec 2003
Location: South Australia
Distribution: RH 7.3 & AdvServ 2.1
Posts: 2

Rep: Reputation: 0
Can't extract expiry days from shadow


Afraid I are having problems trying to extract the number of days to a users password expiry date to use in another application.

I can find no utility on RH like prwarn under SCO.

I have tried with a test script which works fine under root but as the user I have permission problems.

I have
Ush52 $ ll /etc/shadow
-r-------- 1 root root 1289 Dec 12 08:47 /etc/shadow
Ush52 $ ll expiry
-rwsr-xr-x 1 root root 80 Dec 12 07:30 expiry

Ush52 $ cat expiry
EXPDAYS=`cat /etc/shadow | grep $USER`
export EXPDAYS
Ush52 $ expiry
cat: /etc/shadow: Permission denied
Ush52 $

Appreciate any assistance


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
User login expiry date? geekgrl Linux - Security 7 07-04-2011 07:08 AM
SAmba Password Expiry bally Linux - General 0 11-29-2004 11:42 PM
/etc/shadow- (notice the dash after the word shadow) shellcode Linux - Security 1 09-03-2004 05:54 AM
userid expiry ust Linux - Software 1 09-25-2003 06:14 AM
Password expiry klmn1 Linux - Networking 0 12-29-2002 11:29 PM

All times are GMT -5. The time now is 10:59 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration