Linux.com

spixx

spixx

  • Linux.com Member
  • Posts: 9
  • Member Since: 30 Jun 11
  • Last Logged In: 15 Aug 11

Latest Posts

Posted by
Topic
Post Preview
Posted
  • spixx
    RE: superuser
    Quick note: The reason boo works for user X should be because of the fact that you have added /home/X/bin to the PATH (you can check the command out by writing echo $PATH in terminal). When switching to root the user no longer has any PATH entry to that particular folder thus writing boo checks folder /bin /sbin and such but cannot find the script. This is not true when using sudo since sudo is a nice way of doing su -c '/path/to/script/ sudo does the command as another user (namely root) and there the PATH is different :) Hope that helped any other who wondered. echo $PATH as user: /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:[color=#FF0000][b]/home/XXX/bin[/b][/color] And sudo: /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:[color=#FF0000][b]/home/XXX/bin[/b][/color] And as sudo su: /sbin:/bin:/usr/sbin:/usr/bin Note the difference. I'm using Centos so I'm not sure that sudo behaves in the same way on any other dist though.
    Link to this post 28 Jul 11

    Quick note:
    The reason boo works for user X should be because of the fact that you have added /home/X/bin to the PATH (you can check the command out by writing echo $PATH in terminal). When switching to root the user no longer has any PATH entry to that particular folder thus writing boo checks folder /bin /sbin and such but cannot find the script. This is not true when using sudo since sudo is a nice way of doing su -c '/path/to/script/ sudo does the command as another user (namely root) and there the PATH is different :)

    Hope that helped any other who wondered.

    echo $PATH as user:
    /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/XXX/bin

    And sudo:
    /usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/XXX/bin

    And as sudo su:
    /sbin:/bin:/usr/sbin:/usr/bin

    Note the difference. I'm using Centos so I'm not sure that sudo behaves in the same way on any other dist though.

  • spixx
    RE: Bind DNS help!
    Hello! First of all, there is the question of how you point the DNS name. For instance a dns file is null and void if your domain name provider (in essence NOT the same thing as a nameserver) have to point towards you. So first of all if you have domain.xxx you need to tell the internet via your domain name provider that domain.xxx is found at your "whatsmyip.com" address. Secondly you have to open your firewall for access towards traffic at TCP(?)/UDP on port 53 for domain lookup. Protip: If you have a dynamic IP address do not even consider hosting this at home :)
    Link to this post 04 Jul 11

    Hello!
    First of all, there is the question of how you point the DNS name. For instance a dns file is null and void if your domain name provider (in essence NOT the same thing as a nameserver) have to point towards you. So first of all if you have domain.xxx you need to tell the internet via your domain name provider that domain.xxx is found at your "whatsmyip.com" address.

    Secondly you have to open your firewall for access towards traffic at TCP(?)/UDP on port 53 for domain lookup.

    Protip: If you have a dynamic IP address do not even consider hosting this at home :)

  • spixx
    RE: Sendmail scripting - amending subjects of emails
    One way to add content to emails via Sendmails is via milters for instance https://www.milter.org/milters/disclaimer/alphabetical/1 if you need some Content editing possibilties. To be exact you can add a header that your script triggers on. I suggest checking out the site since they can both append information in the mailheader (eg users will not see it) or editing any part of the email.
    Link to this post 04 Jul 11

    One way to add content to emails via Sendmails is via milters for instance https://www.milter.org/milters/disclaimer/alphabetical/1 if you need some Content editing possibilties. To be exact you can add a header that your script triggers on. I suggest checking out the site since they can both append information in the mailheader (eg users will not see it) or editing any part of the email.

Who we are ?

The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.

More About the foundation...

Frequent Questions

Join / Linux Training / Board