Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Need output in one line and filter servers, which has account expired or password exipred Post 303039864 by yash_message on Wednesday 16th of October 2019 02:51:05 PM
Old 10-16-2019
Thanks for reply.

I am getting below error.

Code:
#!/bin/bash
for server in `cat servers.txt`;
do
sshpass -p 'abc' ssh -o StrictHostKeyChecking=no -q -t xyz@${server} awk -v"HN=$(hostname)" '/[mM]inimum/ {next} /PASS_MIN_LEN/{print HN, $2}'  /etc/login.defs
done

awk: fatal: cannot open file `{next}' for reading (No such file or directory)
awk: fatal: cannot open file `{next}' for reading (No such file or directory)
 

9 More Discussions You Might Find Interesting

1. AIX

AIX Non Expired Password

Hi, I am into production support and handling some of the AIX servers. We are planning to have a user id on a AIX system with non-expired password. Now the question is that if I have a non expired password then I cannot do a interactive login to AIX machine ( i:e cannot do Telnet ,SSH etc)... (0 Replies)
Discussion started by: siddhhuu
0 Replies

2. UNIX for Dummies Questions & Answers

prompting for account that expired

I have this problem. Two accounts in an aix. Account A expired and it would auto prompt for new password when the user failed to log in, but Account B would not prompt for the new password. Instead it will only display "your account is expired. Please contact your administrator". I would like to... (1 Reply)
Discussion started by: mayyap
1 Replies

3. UNIX for Advanced & Expert Users

Root account is expired

Hi all, I am using redhat linux version 9 .I am unable to login to the system and i am getting a warninig sorry root account is expired . How can i activate the account. (2 Replies)
Discussion started by: mallesh
2 Replies

4. Solaris

expired root password

We have expiration set on the root password for 30 days. the only way to login as root remotley is login as another user and then su as root. I logged in to the machine today tried to su as root, and got the message password has expired, use passwd to change but i cant get in as root.. If... (1 Reply)
Discussion started by: csaunders
1 Replies

5. AIX

HMC User account expired - What now?

I've created an hmc user account for our developers and set a pawword expiry to 30 days. Trouble is when the password expires they are asked to change it in the WebSM gui but it returns an error "XXXX check log file /var/websm/data/....log" which doesn't exist. I've tried resetting the password... (0 Replies)
Discussion started by: backslash
0 Replies

6. UNIX for Dummies Questions & Answers

How to reactivate expired account in Linux as a root user

I am an administrator of a Red Hat Enterprise Linux system. Now one account expired. I wonder how to reactivate the account. Thanks (2 Replies)
Discussion started by: cy163
2 Replies

7. UNIX for Advanced & Expert Users

password expired

Hi When i try to login with my username/password i get the following message 'Password for user 'lmathew' has expired - use passwd(1) to update it' please let me know what to do Thanks in advane Ammu (2 Replies)
Discussion started by: ammu
2 Replies

8. Solaris

Never Expired for root password

Never expired for root password Guy's I want to change the setting to keep the root password to be nerved expired! Please advice with the sitting! (9 Replies)
Discussion started by: top.level
9 Replies

9. Solaris

Solaris 11 user account login expired

Hi everyone Please i need urgent help... I have installed solaris 11 using live media.. then i installed sunray.. every thing is fine.. but after system reboot i am unable to login on server on GUI it gives account expired error or some time authentication failed... but i can log in through... (11 Replies)
Discussion started by: amk
11 Replies
NWREVOKE(8)							     nwrevoke							       NWREVOKE(8)

NAME
nwrevoke - Revoke a Trustee Right from a directory SYNOPSIS
nwrevoke [ -h ] [ -S server ] [ -U user name ] [ -P password | -n ] [ -C ] [ -o object name | -O object ID ] [ -t type ] file/directory DESCRIPTION
nwrevoke revokes the specified bindery object with the corresponding trustee rights from the directory. nwrevoke looks up the file $HOME/.nwclient to find a file server, a user name and possibly a password. See nwclient(5) for more informa- tion. Please note that the access permissions of $HOME/.nwclient MUST be 600 for security reasons. OPTIONS
-h -h is used to print out a short help text. -S server server is the name of the server you want to use. -U user user is the user name to use for login. -P password password is the password to use for login. If neither -n nor -P are given, and the user has no open connection to the server, nwrevoke prompts for a password. -n -n should be given if no password is required for the login. -C By default, passwords are converted to uppercase before they are sent to the server, because most servers require this. You can turn off this conversion by -C. -o object name The name of the object to be revoked as trustee. -O object ID The ID of the object to be revoked as trustee. -t object type The type of the object. Object type must be specified as a decimal value. Common values are 1 for user objects, 2 for group objects and 3 for print queues. Other values are allowed, but are usually used for specialized applications. If object type is not specified, object name is taken as NDS name. file/directory You must specify the file/directory from which to remove the object as trustee. If you specified -S, it must be fully qualified NetWare notation for DOS namespace. Otherwise it must be file or directory mounted to your system using ncpfs. Example: nwrevoke -S NWSERVER -o linus -t 1 'src:bsd_src' With this example, user linus is removed as trustee from the bsd_src directory on the src volume on server NWSERVER. nwrevoke -o linus -t 1 /home/vana/ncpfs/nwserver/src/bsd_src With this example, user linus is removed as trustee from the bsd_src directory. AUTHORS
nwrevoke was written by Volker Lendecke with the corresponding NetWare utility in mind. See the Changes file of ncpfs for other contribu- tors. nwrevoke 7/9/1996 NWREVOKE(8)
All times are GMT -4. The time now is 09:45 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy