08-08-2003
Not really - you can do the last command to find out who was / is logged in, but that won't be on one central server. If you push your syslog entries out to a central server, you can add an entry into different profiles (/etc/profile and if you use a central user profile) allowing the logger command to note that someone logged in.
Example:
Add to /etc/profile:
/bin/logger "`/bin/logname` logged into `/bin/hostname`"
That would add an entry such as this to /var/adm/messages (if syslog.conf is set up for it)
Aug 8 10:39:50 toast operator: [ID 702911 user.notice] operator logged into toast
Entry in syslog.conf:
*.emerg;*.err;*.alert;*.crit;*.warning;*.notice;*.debug @syslog1.mycom.com
This would log telnet sessions (but not ssh or rsh). Adding the same logger command to each user's .profile (or a central profile - can be done if all users have nfs mounted home directories, don't need (or security disallows) users changing .profile) will log messages if using ssh or rlogin commands (not when copying files with scp or running a command along with a rsh).
(Seems like too much work to bother, but it would give you what you a decent logging method).
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hey,
I've set up a NIS domain with linux as master-server, slave server and clients ... and Linux works fine.
To that NIS domain I tried to add a HPUX 11.00 and an AIX 4.3.3 system (till now - there should be more clients in final version). And both systems now have to same problem:
I can... (3 Replies)
Discussion started by: mod
3 Replies
2. UNIX for Advanced & Expert Users
We have a RedHat 8.0 NIS master, with a RedHat 8.0 NIS Slave.
We also have a small number of SUSE 9.1 and SUSE 10 machines here for evaluation.
However, no matter what i do, the SUSE machines will not talk to the NIS Servers.
If i broadcast for NIS Servers for the specified NIS domain, it... (1 Reply)
Discussion started by: fishsponge
1 Replies
3. Solaris
Hi, all.
I have a Solaris client here needs to bind to NIS server in another subnet. Following is the configuration i made on the client,
1) edit /etc/inet/hosts to add an entry of the NIS server -- nserver01
2) execute `domainname` to set local NIS domain to the domain of the NIS server.... (1 Reply)
Discussion started by: sn_wukong
1 Replies
4. Filesystems, Disks and Memory
Hi friends
how to find the nis users in my servers. i have normal users also.
Thanks & Regards
Manoj (3 Replies)
Discussion started by: manoj123
3 Replies
5. Solaris
Hello experts.
I am using Solaris10. How can i allow a group of users, remaining should be deny.
Thanx in advance. (9 Replies)
Discussion started by: younus_syed
9 Replies
6. Solaris
How to create users in NIS server in solaris
Thanks in Advance (6 Replies)
Discussion started by: durgaprasadr13
6 Replies
7. Solaris
Hi All,
How to restrict the NIS users not to change their passwords in for NIS users??
and my NIS user is unable to login to at client location what could be the problem for this ?
Any body can help me. Thanks in advance. (1 Reply)
Discussion started by: Sharath Kumar
1 Replies
8. Emergency UNIX and Linux Support
Hi all,
So I have created two Centos machines. One is configured as a NIS master and the second is a NIS cleint. The NIS configs are all working perfectly.
I created a user nisuser on NIS Master and I can use it on the client. BUT it doesnt show a home directory . Ive been told there is... (9 Replies)
Discussion started by: Junaid Subhani
9 Replies
9. Shell Programming and Scripting
Hi All,
I am having Solaris 5.10 acting as NIS.
How do i change multiple user password in NIS in a batch.
I have predefined users with their passwords to be set:
Example:
user1 password1
user2 password2
Pls advise. (0 Replies)
Discussion started by: yogajwa
0 Replies
10. Red Hat
Hai all,
I'm rameez rahman working as a Technical assistant.
I configured NIS Server in RHEL 6.5 with 40 client PC's.All the clients are using the same os ie RHEL 6.5 64 bit.All the features are working fine except sound ie from client machine if a NIS user logged in he cant access sound.But if... (2 Replies)
Discussion started by: rameez rahman k
2 Replies
LEARN ABOUT FREEBSD
logger
LOGGER(1) BSD General Commands Manual LOGGER(1)
NAME
logger -- make entries in the system log
SYNOPSIS
logger [-46Ais] [-f file] [-h host] [-P port] [-p pri] [-t tag] [message ...]
DESCRIPTION
The logger utility provides a shell command interface to the syslog(3) system log module.
The following options are available:
-4 Force logger to use IPv4 addresses only.
-6 Force logger to use IPv6 addresses only.
-A By default, logger tries to send the message to only one address, even if the host has more than one A or AAAA record. If this
option is specified, logger tries to send the message to all addresses.
-i Log the process id of the logger process with each line.
-s Log the message to standard error, as well as the system log.
-f file
Read the contents of the specified file into syslog.
-h host
Send the message to the remote system host instead of logging it locally.
-P port
Send the message to the specified port number on a remote system, which can be specified as a service name or as a decimal number.
The default is ``syslog''. If an unknown service name is used, logger prints a warning and falls back to port 514.
-p pri Enter the message with the specified priority. The priority may be specified numerically or as a ``facility.level'' pair. For exam-
ple, ``-p local3.info'' logs the message(s) as informational level in the local3 facility. The default is ``user.notice.''
-t tag Mark every line in the log with the specified tag rather than the default of current login name.
message
Write the message to log; if not specified, and the -f flag is not provided, standard input is logged.
EXIT STATUS
The logger utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
logger System rebooted
logger -p local0.notice -t HOSTIDM -f /dev/idmc
SEE ALSO
syslog(3), syslogd(8)
STANDARDS
The logger command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
BSD
March 4, 2014 BSD