05-14-2008
Thanks a lot Yogesh.....Actually i am trying to write a shell script to find out the user accounts that were not used for more than for 4 months (based on last login) ..and lock them.
DO you have anything simpler than this ..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file named "suspected" with series of line like these :
{'protocol': 17, 'service': 'BitTorrent KRPC', 'server': '219.78.120.166', 'client_port': 52044, 'client': '10.64.68.44', 'server_port': 8291, 'time': 1226506312L, 'serverhostname': ''}
{'protocol': 17, 'service': 'BitTorrent... (3 Replies)
Discussion started by: rk4k
3 Replies
2. Shell Programming and Scripting
Hi guys,
I know that this topic has been discuss numerous times, and I have search the net and this forum for it.
However, non able to address the problem I faced so far.
I am on Solaris Platform and unable to install additional packages like the GNU date and gawk to make use of their... (5 Replies)
Discussion started by: DrivesMeCrazy
5 Replies
3. UNIX for Advanced & Expert Users
I Have variable $currenttime and I want to display this variable as a TIME FORMAT and the $currenttime value contains like
000000
120000
020000
I want to display to
00:00:00
12:00:00
02:00:00
please help me how to this one (1 Reply)
Discussion started by: gksenthilkumar
1 Replies
4. Shell Programming and Scripting
I have a list of interfaces and time the interface was last active. I can't figure out how to convert the time in the second column,
Fa1/14 0
Se0/0/0 0
Fa1/11 0
Fa1/9 0
Fa1/0 0
Se0/0/1 1240401408
Gi1/0 0
Fa0/0 1240401408
Fa1/3 0
Fa1/8 0
Fa1/15 0
Fa1/13 0
Fa1/10 0
Fa1/1 0
Fa1/12... (7 Replies)
Discussion started by: mrlayance
7 Replies
5. Shell Programming and Scripting
Hi,
Is there any easy way to convert date time(stored in shell variable ) to epoch time in solaris box? As +%s is working on linux but not on solaris, also -d option is not working.
Any suggestion please? (6 Replies)
Discussion started by: anshuman0507
6 Replies
6. AIX
Hello,
Using AIX6.1 box.
I have UTC time value and need to convert it to local time value - I mean time zone and DST should be taken into consideration.
I hope it could be done using shell environment - I don't want to write a program.
thanks
Vilius
---------- Post updated at 02:30 PM... (2 Replies)
Discussion started by: vilius
2 Replies
7. Shell Programming and Scripting
Hello All -
I have a script that grabs data from the net and outputs the following data
46029 46.144 -124.510 2010 07 26 22 50 320 4.0 6.0 2.2 9 6.8 311 1012.1 -0.9 13.3 13.5 13.3 - -
46041 47.353 -124.731 2010 07 26 22 50 250 2.0 3.0 1.6 8 6.4 - 1011.6 - ... (0 Replies)
Discussion started by: drexnefex
0 Replies
8. Shell Programming and Scripting
Dear experts,
I have an epoch time input file such as : -
1302451209564
1302483698948
1302485231072
1302490805383
1302519244700
1302492787481
1302505299145
1302506557022
1302532112140
1302501033105
1302511536485
1302512669550
I need the epoch time above to be converted into real... (4 Replies)
Discussion started by: aismann
4 Replies
9. UNIX Desktop Questions & Answers
Hi All,
I need your help with the following:
My input shows the time in this format 1311547776493
I need to convert it (as part of my AWK script) into this format:
18-08-2011 09:35:11.072
Thanks a lot!
Royi (4 Replies)
Discussion started by: royip
4 Replies
10. Shell Programming and Scripting
Hi guys thanks for the help for my previous posts.Now i have a requirement that i download a XMl file which has UTC time stamp.I need to convert UTC time into Unix server timezone.
For ex if the time zone of unix server is CDT then i need to convert into CDT.whatever may be the system time... (5 Replies)
Discussion started by: mohanalakshmi
5 Replies
LEARN ABOUT REDHAT
passwd
PASSWD(5) File formats PASSWD(5)
NAME
passwd - password file
DESCRIPTION
Passwd is a text file, that contains a list of the system's accounts, giving for each account some useful information like user ID, group
ID, home directory, shell, etc. Often, it also contains the encrypted passwords for each account. It should have general read permission
(many utilities, like ls(1) use it to map user IDs to user names), but write access only for the superuser.
In the good old days there was no great problem with this general read permission. Everybody could read the encrypted passwords, but the
hardware was too slow to crack a well-chosen password, and moreover, the basic assumption used to be that of a friendly user-community.
These days many people run some version of the shadow password suite, where /etc/passwd has *'s instead of encrypted passwords, and the
encrypted passwords are in /etc/shadow which is readable by the superuser only.
Regardless of whether shadow passwords are used, many sysadmins use a star in the encrypted password field to make sure that this user can
not authenticate him- or herself using a password. (But see the Notes below.)
If you create a new login, first put a star in the password field, then use passwd(1) to set it.
There is one entry per line, and each line has the format:
account:password:UID:GID:GECOS:directory:shell
The field descriptions are:
account the name of the user on the system. It should not contain capital letters.
password the encrypted user password or a star.
UID the numerical user ID.
GID the numerical primary group ID for this user.
GECOS This field is optional and only used for informational purposes. Usually, it contains the full user name. GECOS means
General Electric Comprehensive Operating System, which has been renamed to GCOS when GE's large systems division was sold
to Honeywell. Dennis Ritchie has reported: "Sometimes we sent printer output or batch jobs to the GCOS machine. The gcos
field in the password file was a place to stash the information for the $IDENTcard. Not elegant."
directory the user's $HOME directory.
shell the program to run at login (if empty, use /bin/sh). If set to a non-existing executable, the user will be unable to
login through login(1).
NOTE
If you want to create user groups, their GIDs must be equal and there must be an entry in /etc/group, or no group will exist.
If the encrypted password is set to a star, the user will be unable to login using login(1), but may still login using rlogin(1), run
existing processes and initiate new ones through rsh(1), cron(1), at(1), or mail filters, etc. Trying to lock an account by simply chang-
ing the shell field yields the same result and additionally allows the use of su(1).
FILES
/etc/passwd
SEE ALSO
passwd(1), login(1), su(1), group(5), shadow(5)
1998-01-05 PASSWD(5)