08-03-2010
The -b batchfile option should convince it the session's completely noninteractive and fail instead of prompting.
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
login: TEST7
TEST7's Password:
Your password will expire: Wed Feb 19 14:28:08 2003
How can I the same information become in a script (as example
in the .profile)?????????
My login starts with .profile. These File is a menue with 24 lines and the message " Your password ....." disappear
to... (8 Replies)
Discussion started by: Erwin Stocker
8 Replies
2. UNIX for Advanced & Expert Users
Hi,
How to disable passwd expire in HP UNIX by not using SAM ?
In our system SAM have some strange bugs. However due to some reason, we cannot add that patch.
B. Rgds
Christina (3 Replies)
Discussion started by: christina fung
3 Replies
3. Shell Programming and Scripting
Hi,
Is there any way to find out the UNIX user's password expire date?. It'll we helpful to inform the users to change the password before it get expires.(FYI - I am not having only admin previlege.) (1 Reply)
Discussion started by: sharif
1 Replies
4. Solaris
Hello
I want to set the password for user never expire through the command line. For your information the box is running under Solaris 8 platform. (2 Replies)
Discussion started by: shamsul
2 Replies
5. Red Hat
Hi All,
Is this true on chage command?
-M, MAX_DAYS
Passing the number -1 as MAX_DAYS will remove checking a password's validity.
Does this means password will not expire anymore?
Thanks for any comment you may add. (0 Replies)
Discussion started by: itik
0 Replies
6. Solaris
Hi,
I have a small problem that I need to address regarding the password expiration for a number of different oracle accounts. Currently I have the MAXWEEKS set to 12 in the /etc/default/passwd file for all accounts. I also have sudo installed on the server and users access the oracle accounts... (2 Replies)
Discussion started by: sparcman
2 Replies
7. AIX
Does anyone know if the default message displayed when a users password has expired can be changed? I am just assuming the message below is the default one. If so please tell.
Using username "justinxx".
justinxx@160.23.12.44's password:
WARNING: Your password has expired.
You must... (2 Replies)
Discussion started by: juredd1
2 Replies
8. Shell Programming and Scripting
hey Guys, I haven't posted in a while, But you guys were really helpful alst time.
I have had a issue with User Passwords expiring, and since I dont check /var/cron/log on the regular I never know these suers are expiring, making certain nightly jobs not run.
With this script, I want to be... (14 Replies)
Discussion started by: gkelly1117
14 Replies
9. AIX
Hello,
I am trying to write a shell script, which will send email alerts to Admin/users when users password is going to expire in 15 days.
Can you please help me with the script.
thank you. (3 Replies)
Discussion started by: Kumar7997
3 Replies
10. Solaris
Hi Lads,
I would like place the mechanism of force reset password to user when he login to the server after his password expired. Currently, We are resetting users once in every 60 days using cron job but I am thinking is there any other way to force reset passwords after it expires? I am using... (1 Reply)
Discussion started by: Navkreddy
1 Replies
LEARN ABOUT OPENSOLARIS
sd_pid_get_owner_uid
SD_PID_GET_SESSION(3) sd_pid_get_session SD_PID_GET_SESSION(3)
NAME
sd_pid_get_session, sd_pid_get_unit, sd_pid_get_owner_uid - Determine session, service or owner of a session of a specific PID
SYNOPSIS
#include <systemd/sd-login.h>
int sd_pid_get_session(pid_t pid, char** session);
int sd_pid_get_unit(pid_t pid, char** unit);
int sd_pid_get_owner_uid(pid_t pid, uid_t* uid);
DESCRIPTION
sd_pid_get_session() may be used to determine the login session identifier of a process identified by the specified process identifier. The
session identifier is a short string, suitable for usage in file system paths. Note that not all processes are part of a login session
(e.g. system service processes, user processes that are shared between multiple sessions of the same user, or kernel threads). For
processes not being part of a login session this function will fail. The returned string needs to be freed with the libc free(3) call after
use.
sd_pid_get_unit() may be used to determine the systemd unit (i.e. system service) identifier of a process identified by the specified
process identifier. The unit name is a short string, suitable for usage in file system paths. Note that not all processes are part of a
unit/service (e.g. user processes, or kernel threads). For processes not being part of a systemd unit/system service this function will
fail. The returned string needs to be freed with the libc free(3) call after use.
sd_pid_get_owner_uid() may be used to determine the Unix user identifier of the owner of the session of a process identified the specified
PID. Note that this function will succeed for user processes which are shared between multiple login sessions of the same user, where
sd_pid_get_session() will fail. For processes not being part of a login session and not being a shared process of a user this function will
fail.
If the pid paramater of any of these functions is passed as 0 the operation is executed for the calling process.
RETURN VALUE
On success these calls return 0 or a positive integer. On failure, these calls return a negative errno-style error code.
NOTES
The sd_pid_get_session(), sd_pid_get_pid(), and sd_pid_get_owner_uid() interfaces are available as shared library, which can be compiled
and linked to with the libsystemd-login pkg-config(1) file.
Note that the login session identifier as returned by sd_pid_get_session() is completely unrelated to the process session identifier as
returned by getsid(2).
SEE ALSO
systemd(1), sd-login(7), sd_session_is_active(3), getsid(2)
AUTHOR
Lennart Poettering <lennart@poettering.net>
Developer
systemd 10/07/2013 SD_PID_GET_SESSION(3)