[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: loggin 'su'



>> 	Is there any way to log with syslog all attepts (good & bad) to
>> user 'su' ?
>If you can, it would be in the manual page, right.
>man syslog.conf.

Actually, in this case it's not in any manpage.

There was a behjavior change at the hamm/slink transition- hamm su would log to syslog, 
slink su would not.  I researched this, and discoverd that the issue is some compile-time
definitions  that the newer su.c files need in order to activate syslog activity.  
The makefile doens't enable them, so su doesn't do syslog logging.

There are some bugs filed against this, but I am not sure what their status is.

I have some steps below to fix su.
Use caution in following the steps below.  Don't blame me if you break something,
and be ready to log in on the console in case you break su.

T y p e  s l o w l y .

Here is what I did to fix su:

1) download the appropriate version of the source code for the shellutils
package. You need the .orog.tar.gz , the .diff.gz, and the .dsc from the
debian server.

2) put these three files in some dir under /usr/src, and cd there.  Then run 
  # dpkg-source -x shellutils_VER.dsc

  This will unpack the tar file and patch it.

2) cd to shellutils-VER and run ./configure
   cd to src and open su.c in an editor.

  Add the following three lines at the very top, before the comment:

  #define SYSLOG_SUCCESS 1  
  #define SYSLOG_FAILURE 1
  #define SYSLOG_NON_ROOT 1

  they need to be flush with the left margin.

3)
  # cd ..
  # cd lib
  # make all
  # cd ..
  # cd intl
  # make all
  # cd ..
  # cd src
  # make su

  # chmod 4755 su
  # < test su until you are happy with it>
  # mv /bin/su /bin/su.debian
  # chmod 700 /bin/su.debian
  # cp su /bin

 # <ensure /bin/su still works>


I suppose you could run debian/rules binary from the top of the source tree
to generate a debian package, and then iat, if you don't like to run make by hand.
However, this will also remake all the other shellutils, so the compile time will be 
longer

carl


Reply to: