Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Last time Logged into CMS 3

Status
Not open for further replies.

MQH12

Technical User
Aug 2, 2010
80
US
OMG you all, if I ever thought I knew anything about this then I was sorely mistaken. I have reviewed all the "basic command" manuals I can find. I have reviewed the help feature. I even wrote Bill Zimmerly. LOL. No Really. I am a PBX programmer. My boss has asked if I can find out if we need more licenses for CMS. The info seems to be in this Sun box. I have the command who am i, and cmssvc, but that is it. Can someone please give me the command to see when the last time someone or everyone was logged in? Also remember I am not knowledgeable on this at all. I have two commands. LOL. OH and I can change a password for someone in CMS, that is 3 commands. If you were me what commands would I need to get this information about if we need more licenses. We have 15 licenses and 45 users. They dont all scream at one time for some reason. Thank you in advance.
 
Code:
r3cms [337]-> last
dsh       pts/16       204.16.2.65      Mon Sep 20 14:01   still logged in
darks     pts/10       204.17.70.190    Mon Sep 20 13:56   still logged in
rich      pts/15       204.17.70.190    Mon Sep 20 13:42   still logged in
matt      pts/13       204.17.70.190    Mon Sep 20 13:40   still logged in
don       pts/14       204.17.70.176    Mon Sep 20 13:37   still logged in
darks     pts/13       204.17.70.190    Mon Sep 20 12:59 - 13:39  (00:40)
bfraizer  pts/12       204.17.70.171    Mon Sep 20 12:21   still logged in
fredx     pts/10       204.17.70.170    Mon Sep 20 12:00 - 13:55  (01:55)
fredx     pts/10       204.17.70.190    Mon Sep 20 11:47 - 11:58  (00:11)
fredx     pts/12       204.17.70.190    Mon Sep 20 11:02 - 11:23  (00:20)
fredx     pts/12       204.17.70.190    Mon Sep 20 10:39 - 11:01  (00:22)
bfraizer  pts/10       204.17.70.190    Mon Sep 20 10:16 - 11:03  (00:47)
fredx     pts/10       204.17.70.190    Mon Sep 20 09:59 - 10:04  (00:05)
stevej    pts/5        192.168.201.200  Mon Sep 20 09:29   still logged in
fredx     pts/10       204.17.70.190    Mon Sep 20 09:08 - 09:59  (00:51)
peterj    pts/11       204.17.124.80    Mon Sep 20 08:40   still logged in
bfraizer  pts/10       204.17.70.190    Mon Sep 20 08:11 - 09:03  (00:51)
haroldz   pts/9        204.17.124.168   Mon Sep 20 08:10   still logged in
fredx     pts/5        204.17.70.190    Mon Sep 20 08:08 - 09:02  (00:54)
bfraizer  pts/9        204.17.70.190    Mon Sep 20 07:43 - 08:07  (00:24)
fredx     pts/5        204.17.70.190    Mon Sep 20 07:24 - 08:06  (00:42)
joshj     pts/4        204.17.70.165    Mon Sep 20 06:58   still logged in
davidr    pts/7        204.17.70.46     Mon Sep 20 06:53   still logged in
bfraizer  pts/7        204.17.70.190    Mon Sep 20 06:36 - 06:53  (00:16)
bethb     pts/6        204.17.70.185    Mon Sep 20 06:30   still logged in
fredx     pts/5        204.17.70.190    Mon Sep 20 06:20 - 06:52  (00:32)
joshj     pts/4        204.17.70.190    Mon Sep 20 06:10 - 06:52  (00:42)
kristic   pts/3        204.17.124.75    Mon Sep 20 06:03   still logged in
joshj     pts/4        204.17.70.190    Mon Sep 20 05:08 - 06:02  (00:53)
fredx     pts/3        204.17.70.190    Mon Sep 20 04:50 - 05:39  (00:49)
dsh       pts/2        204.16.2.65      Sat Sep 18 08:23   still logged in
jimmy     pts/12       204.17.70.52     Fri Sep 17 10:00 - 10:11  (00:10)
tomo      pts/15       204.17.70.73     Fri Sep 17 09:30 - 14:31  (05:00)
stevej    pts/11       204.17.70.173    Fri Sep 17 09:06 - 16:53  (07:47)
scottb    pts/10       192.168.201.187  Fri Sep 17 07:59 - 17:30  (09:30)
peterr    pts/9        204.17.124.80    Fri Sep 17 07:46 - 17:03  (09:16)
dennis    pts/3        204.17.70.46     Fri Sep 17 07:04 - 16:36  (09:31)
haroldz   pts/16       204.17.124.168   Fri Sep 17 05:32 - 17:11  (11:39)

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
 
Thank you very much.....uh is that R3cms space last or enter last? What is the 337?
 
r3cms is system name
337 is ksh command number

"last" is a supported solaris / linux command

A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
 
Oh for heavens sakes. I put in r3cms 337 last and it said not found. What am I missing?
 
last <CR>


A great teacher, does not provide answers, but methods to teach others "How and where to find the answers"

bsh

36 years Bell, AT&T, Lucent, Avaya
Tier 3 for 26 years and counting
 
YEAH!!! just the word LAST worked. There is a message wtmp starts 9/17/10 and the time. I dont have anything before then. Not sure how every person would have logged in since the 18th. There has to be users that have not logged in at all. Would this be right?

Also can you give me the command to see who has never initialized their password and have never logged in?

Thank you so much. I guess if you are going to program this Sun you gotta know a few commands. I really appreciate your help.
 
It seems that maybe your wtmp get's cleared down regularly, perhaps by a cron job. Whether this is a good or bad thing is debatable, but certainly you seem to have no chance of recovering login information before 9/17 (in US parlance), unless the old wtmp files are archived somewhere before they are zeroed?

I don't know of a command which would tell you who hasn't initialised their password, or logged in, though that's not to say someone out there can't help with that. Perhaps you could traverse the home directories and look at file creation times for some clues.

All in all I would really recommend you do some homework on Sun Solaris commands, it's difficult to assist when we're doing it one command at a time. Sorry if this sounds a little hand-washing, but I'm sure we'll help you as much a we can.

The internet - allowing those who don't know what they're talking about to have their say.
 
The logins command (see the man pages, via man logins) can help answer some of your enquiries.

logins -p # display users without a password
logins -x # display extended info - see man pages


I hope that helps.

Mike
 
Star for Mike, logins is a new one on me!

The internet - allowing those who don't know what they're talking about to have their say.
 
THANK YOU Mike!!! YO you get the star for the day. I appreciate it.
 
logins -p # display users without a password
logins -x # display extended info - see man pages

eh........I did logins -p and it prompted for a password. is there spaces. I just did logins space dash p. Is there anything after that? or something I am missing. I gotta tell ya. You could spend an entire career on Unix. LOL

 
Are you logged in as root? logins<space>-p should work

The internet - allowing those who don't know what they're talking about to have their say.
 
I think you're typing login rather than logins (the s is vital).

The internet - allowing those who don't know what they're talking about to have their say.
 
yes that worked. I assume that is all the people who have never logged in. Thank you,
 
OH NO..........They want another report. OMG this is stressing me out. They want to know how to log people off if they have not used the system for 3 hours. Is this possible? THANK YOU!!!
 
You should set the TMOUT variable in /etc/profile to 10800 (seconds in 3 hours) like this:

export TMOUT=10800

The internet - allowing those who don't know what they're talking about to have their say.
 
I assume that is all the people who have never logged in.

No. It is all the people who don't have a password (or are using a password of 'zero length'). You can login every day for a month, have no (or NUL) password and still be part of the list produced by logins -p.


I hope that helps.

Mike
(PS. Thanks for the 'star', Ken)
 
OK Ken - Last question i hope. Say I implement as shown above. What would I put in if they changed their minds and wanted it back to the "not logging them off at a certain time"?

I would not even want to quess. Thanks,
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top