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 Mike Lewis 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.
 
Setting TMOUT to 0 (zero) sets it to unlimited, ie never log me out automatically.

The internet - allowing those who don't know what they're talking about to have their say.
 
Oh dear....here we go. I am at the root# directory. I need to know how to get to the /etc/profile directory. I typed in export TMOUT = 10800 in the root directory but no go. Can you tell me how to get to the /etc/profile directory. I am familiar with the CD command but that is about it. I am almost there. Any help I would appreciate it. Thanks,
 
you cannot change directory to a filename

/etc is a directory
/etc/profile is a file

cat /etc/profile | less
cat /etc/profile | more
cat /etc/profile | pg
vi /etc/profile

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
 
An easier way for you to add the TMOUT to /etc/profile if you're uncomfortable with vi might be to issue the command:

echo export TMOUT=10800 >> /etc/profile

to add it to the bottom of the /etc/profile file. The >> is essential to avoid replacing the whole file!

Incidentally, in the above:

cat /etc/profile | less
cat /etc/profile | more
cat /etc/profile | pg

the cat commands are superfluous and canbe replaced by:

less /etc/profile
more /etc/profile
pg /etc/profile

Don't want the UUOC police on your case!







The internet - allowing those who don't know what they're talking about to have their say.
 
Sorry. should have added that any TMOUT set in /etc/profile will be overridden by one set in a user's .profile, so you may want to check them too.

The internet - allowing those who don't know what they're talking about to have their say.
 
You can set [tt]TMOUT[/tt] to be read only like this...
Code:
export TMOUT=10800
readonly TMOUT
That way it can't be overridden in their personal [tt].profile[/tt].


 
Interesting Sam, didn't know that. Have a star.

The internet - allowing those who don't know what they're talking about to have their say.
 
YEAH!!! I was able to find a unix programmer that could just jump all around the program. He was able to make this change for me. I was able to watch.

THANK YOU ALL FOR ALL OF YOUR HELP!!! I hope you learned as much as I did.

BIG STARS FOR ALL!!!
 
Wow! Gotta love the enthusiasm!

One additional comment on the "[tt]readonly[/tt]" variable, it can still be turned off in a personal profile with something like this...
Code:
[[ "${-}" = @(*i*) ]] && exec sh -c 'unset TMOUT; exec ksh'
To work, this MUST be the last line in the profile since there are two [tt]exec[/tt]'s in it. It will also only execute for an interactive shell, so it won't break [tt]cron[/tt] jobs.

How it parses...

[tt][[ "${-}" = @(*i*) ]] &&[/tt] Tests for it being an interactive session & only continues if it is.

[tt]exec sh -c [/tt] Overlays your session with a shell that doesn’t support read only variables.

[tt]unset TMOUT; exec ksh [/tt] In the Bourne shell this removes TMOUT and runs your Korn shell again.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top