Hi,
We use mostly Sol 10 and few Sol 9 in production
box. We have a requirement to find out how many
user accounts have aged or locked out. Is there
a system call in 'C' which can tell this. Or
alternatively is there a way to find this out
via shell. Please note that the script or the
C program is non-root. I tried looking at
/etc/shaddow but /etc/shadow can not be
read by anyone except root.
Thanks in advance.
|
|
0
|
|
|
|
Reply
|
dcruncher4
|
9/4/2007 2:00:27 PM |
|
In article <fbjodr0vbp@drn.newsguy.com>, dcruncher4@aim.com wrote:
> Hi,
>
> We use mostly Sol 10 and few Sol 9 in production
> box. We have a requirement to find out how many
> user accounts have aged or locked out. Is there
> a system call in 'C' which can tell this. Or
> alternatively is there a way to find this out
> via shell. Please note that the script or the
> C program is non-root. I tried looking at
> /etc/shaddow but /etc/shadow can not be
> read by anyone except root.
>
> Thanks in advance.
In versions before Solaris 9, the only way to access /etc/shadow was as
root. That file contained the account expiration information in various
fields encoded as the internal Solaris date value. You could access it
(as root) through the passwd command (check out the man page for passwd).
I imagine this isn't that changed in Solaris 9 and 10. You could write
a perl script that does what you want and allow it to be run through
sudo.
But I'm not aware of any system call that will give you this information
without root access.
--
DeeDee, don't press that button! DeeDee! NO! Dee...
|
|
0
|
|
|
|
Reply
|
Michael
|
9/4/2007 6:09:38 PM
|
|