Expire Command | Need Help


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Expire Command | Need Help
# 1  
Old 03-12-2010
Question Expire Command | Need Help

Hi ,

I am trying to execute the ipl file as below :

my $user="iwadmin";
chomp $user;
system("passwd -x 29 $user");

The ipl file executes with out any issues when i have logged in as root in solaris .but when when i try to execute the same file with other user id ie iwadmin ,it says permission denied

How can i run the ipl while as iwadmin with out getting any permission denied error ? Please help


Abhishek
# 2  
Old 03-12-2010
Only a privileged user can run the 'passwd -x' command on Solaris. User 'iwadmin'
does not have the necessary privilege to run this command.

The 'usermod' command can be used to change user privileges. Please work with your
sysadmin to see if 'iwadmin' should be given the privilege to run the command.

Alternatively, you can modify the script to fail with a nice error message if a
non-root user tries to execute it.
# 3  
Old 03-12-2010
Hi Yes true what you say , but we need to able to set expiry of a user id when ever the user resets or changes his/her password , is there any work around for the same , so that which ever user re sets his password , the expire command is automatically executed for that user

what about expect command or sudoers , will this help ?

Abhishek
# 4  
Old 03-12-2010
If the expire value has made its way into the /etc/shadow file then it should be preserved between password changes.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Solaris

Never Expire & Never Lock

Hi There, Actually I'm looking for command in Solaris 11 for the following Command to do User Never Expire. Command to return the user Expire to normal mode. Command to do User Never Lock. Command to return the user Never Lock to normal mode. Please advice .. (1 Reply)
Discussion started by: roooooooooot
1 Replies

2. Shell Programming and Scripting

Expire license

I have a program that outputs a file on the number days left before software license expired. It reads in a text file name expiredt.txt. expiredt.txt contents are as follows: EM software 30NOV2015 11/30/2015 ABM software 30NOV2015 11/30/2015 ABM software ... (2 Replies)
Discussion started by: dellanicholson
2 Replies

3. AIX

Password Expire Message

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

4. Solaris

user to be never expire ..

Hi All, I have Solaris 9 and there is user created in that server called appuser That user should to be never expire.. can anyone advice me how can I modify that user to be never expire thru the command line without using GUI tool. (1 Reply)
Discussion started by: Mr.AIX
1 Replies

5. UNIX for Advanced & Expert Users

SFTP password expire error

Hi, I am using sftp in batch script for which all configuration for public/private keys are done and it works fine without asking a password. No issues till this point. Now I the problem I have is that if the password expires/someone changes the authentication keys at reote server then the... (4 Replies)
Discussion started by: coolwade
4 Replies

6. Red Hat

set password not to expire

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

7. Solaris

Set Password Never Expire

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

8. Shell Programming and Scripting

Password expire

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

9. Shell Programming and Scripting

Telnet session does not expire

Dear friends.. Our project has a module that runs on handheld devices. Through the handheld we telnet to solaris where the application actually runs. I noticed that after starting a session through the handheld, if i go out of range or if i remove and replace the battery in the handheld, the... (1 Reply)
Discussion started by: deepsteptom
1 Replies

10. UNIX for Advanced & Expert Users

password will expire

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
Login or Register to Ask a Question