- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- passwd -a -s
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:27 AM
01-03-2006 08:27 AM
passwd -a -s
gmm1018 PS 12/28/05 0 90 14
txp0329 PS
pjg0917 PS
abc0128 PS
txy1213 PS
The users txpo0329 and below will never receive and email because those other fields are not populated. I have checked all the security setups for each user and they are identical. I also have PHCO_24189 installed.
We are on HP-UX lawson B.11.00 U 9000/800
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:42 AM
01-03-2006 08:42 AM
Re: passwd -a -s
You have to create for each user in his home directory file called .forward and put into it the user's mail address, e.g for txp0329: tim_downs@downs.com
In this case mail sent to txp will be redirected to Tim.
HTH
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-03-2006 08:47 AM
01-03-2006 08:47 AM
Re: passwd -a -s
This behavior is expected. If there is isn't any aging information, then only the name and status are returned. This is better documented in the 11i manpages:
http://docs.hp.com/en/B2355-60127/passwd.1.html
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2006 02:24 AM
01-04-2006 02:24 AM
Re: passwd -a -s
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-04-2006 04:43 AM
01-04-2006 04:43 AM
Re: passwd -a -s
the way HP-UX is storing password aging information is a bit brain damaged,
as compared to other Unices.
(e.g. Solaris and Linux place that in /etc/shadow)
To play with I temporarily assigned this account's passwd
$ grep saz /etc/passwd
saz:eM6Z04PZmIo6c,/.KR:102:20:SAZ login:/home/saz:/sbin/sh
As you can see, the aging info is stored within the passwd field in a string directly following a comma.
Placing it there is really bizarre.
This would translate to
$ passwd -s saz
saz PS 12/29/05 0 7
Actually, since you already are using a Perl script, why not let Perl retreive the data by its built-in mappings of the standard syscalls?
You can get displayed (via Config.pm) what your Perl built actually supports,
as far as passwords are concerned.
$ perl -V:d_pw.+
d_pwage='define'
d_pwchange='undef'
d_pwclass='undef'
d_pwcomment='define'
d_pwexpire='undef'
d_pwgecos='define'
d_pwpasswd='define'
d_pwquota='undef'
Ah, that's a shame.
On HP-UX we don't get the passwd expiration,
but pwage is defined.
You need to look at "perldoc -f getpwent"
to see what lists are returned.
$ perl -e 'print join("\n",getpwnam("saz"),"")'
saz
eM6Z04PZmIo6c
102
20
/.KR
SAZ login
SAZ login
/home/saz
/sbin/sh
That's really oblique.
My Perl build returns the aging string as 5th list element which ought to be the gecos field according to the POD.
But now you only need to map the "encoding"
(which is some sort of Base64 according to "man 4 passwd")
So you could probably do something like this
(sorry webserver flattens the indentations)
my (@agers, %map_age);
{ my $i=0;
%map_age = map { $_ => $i++ } (qw[. /], 0..9, 'A'..'Z', 'a'..'z');
}
while (my @rec = getpwent) {
push @agers, [@rec[0,4]] if $rec[4];
}
foreach my $ager (@agers) {
my ($max_weeks, $min_weeks) =
map{$map_age{$_}} split(//, substr($ager->[1], 0, 2));
if ($max_weeks <= 1) {
my $user_to_mail = $ager->[0];
#
# implement emission of mail here
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-05-2006 05:41 AM
01-05-2006 05:41 AM