Results 1 to 5 of 5

Thread: Send an email to a user logs

  1. #1
    Join Date
    Mar 2010
    Posts
    200

    Send an email to a user logs

    Hello,
    I have a Linux server (Debian Etch) and I am very concerned about his safety. Send me an email each time a user logs into SSH or Shell in Direct with information such as the user on which the person has logged on, the IP address and time. I do not know if this is possible, but I think it can be very handy. How can I do this. If you have any idea then please let me know.

  2. #2
    Join Date
    Nov 2009
    Posts
    335

    Re: Send an email to a user logs

    Hello,
    You can specify in
    Code:
    / etc / passwd
    the shell to launch the connection of a user. You just have to specify your start script, then / bin / bash for example. I think this is solution works very well. The information that you want to recover are already in the logs (/ var / log / auth.log). Look at the side of logwatch. Even this may help you.

  3. #3
    Join Date
    Dec 2009
    Posts
    292

    Re: Send an email to a user logs

    Hello,
    Even I would love something like this. I managed by changing the configuration file sh: / etc / sh / shrc. I simply inserted the command to send the mail. What is good is that it is also the user who sent the mail is one that connects. If you have any more queries regarding this you can post back and we will try to solve your problem.

  4. #4
    Join Date
    Nov 2009
    Posts
    356

    Re: Send an email to a user logs

    Hello,
    Unless the user knows that there a bit just uncomment the line that appeals to zsh bash where to go in or go for another solution. The solution of looking through the logs is still much more "pro". A typical user does not have write permission on / etc / passwd nor / etc / sh / shrc. You can even try this solution.

  5. #5
    Join Date
    Nov 2009
    Posts
    359

    Re: Send an email to a user logs

    Hello,
    Change the name of the superuser does not do anything, except to confuse. And how come there are only root has access to your server? You have many users who connect through ssh? Well he can use the chsh (1). chsh relies on / etc / shells for the list of shells allowed. And security by obscurity is never a good choice. I guess this solution helps you.

Similar Threads

  1. Replies: 4
    Last Post: 27-02-2011, 04:32 AM
  2. Windows live mail couldn't send email but can receive email
    By danielyen in forum Windows Software
    Replies: 1
    Last Post: 15-07-2010, 12:17 AM
  3. Replies: 3
    Last Post: 08-04-2008, 06:08 AM
  4. Replies: 2
    Last Post: 14-02-2008, 09:16 PM
  5. Replies: 7
    Last Post: 06-12-2007, 09:46 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,114,097.21587 seconds with 17 queries