10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Team,
I have written the shell script which returns the result of the disk space filesystems which has crossed the threshold limit in HTML Format. Below mentioned is the script which worked perfectly on QA system.
df -h | awk -v host=`hostname` '
BEGIN {
print "<table border="4"... (13 Replies)
Discussion started by: Harihsun
13 Replies
2. Shell Programming and Scripting
Hello, Newbie here,
I have a perfectly well working web service call I can issue from chrome (PC Windows 10) and get the results I want (a dimmer being turned on in Fibaro Home Center 2 at level 40)
I am not allowed to post urls but the below works with http and :// and... (3 Replies)
Discussion started by: abigbear
3 Replies
3. Shell Programming and Scripting
Hi,
Can anyone help me on my PHP cron not working, but when i do the manual it work.
# manual run working
/usr/local/bin/php /root/dev/test.php
# crontab not working
55 8 * * * /usr/local/bin/php /root/dev/test.php
Thank in advances
Regards,
FSPalero
Please use CODE tags as... (2 Replies)
Discussion started by: fspalero
2 Replies
4. Shell Programming and Scripting
I am trying to automate a script where I need to use pbrun /bin/su but for some reason it is not passing thru the pbrun as my code below.
. ~/.bash_profile
pbrun /bin/su - content
c h 1
hpsvn up file path
I am executing this from an external .sh file that is pointing to this scripts file... (14 Replies)
Discussion started by: jorgejac
14 Replies
5. Red Hat
Hi Team
we have created a DNS server at RHEL6.2 environment in 10.20.203.x/24 network.
Everything is going well on linux client as nslookup, ping by host etc in entire subnet. We are getting problem in windows client as nslookup working as well but not ping. all the firewall is disabled and... (5 Replies)
Discussion started by: boby.kumar
5 Replies
6. Shell Programming and Scripting
Help. My script is working fine when executed manually but the cron seems not to catch up the command when registered.
The script is as follow:
#!/bin/sh
for file in file_1.txt file_2.txt file_3.txt
do
awk '{ print "0" }' $file > tmp.tmp
mv tmp.tmp $file
done
And the cron... (2 Replies)
Discussion started by: jasperux
2 Replies
7. Solaris
Hi, This is a strange issue: We have an sftp server. Users can ssh to it from internal LAN without any issue, but they can not ssh to it externally via firewall. Here is what I got:
OS is Solaris 9. No hosts.allow and hosts.deny files.
Please help. Thank you in advance! (7 Replies)
Discussion started by: aixlover
7 Replies
8. UNIX for Advanced & Expert Users
Hi,
Putting across a few awk expressions.
Apart from the last, all of them are working.
echo a/b/c | awk -F'/b/c$' '{print $1}'
a
echo a/b/c++ | awk -F'/b/c++' '{print $1}'
a
echo a/b/c++ | awk -F'/b/c++$' '{print $1}'
a/b/c++
Request thoughts on why putting a '$' post double ++... (12 Replies)
Discussion started by: vibhor_agarwali
12 Replies
9. Linux
Dear all,
I am totally despaired and puzzled.
Using Filezilla under Windows under the same network as our Linux servers is working. Using FTP command-line client under any of our Linux debian servers is not working ! I tried with different FTP servers -> same problem !
All commands are... (12 Replies)
Discussion started by: magix_ch
12 Replies
10. Solaris
If I use an old inetd based service that specified /usr/sbin/tcpd for proftpd, do I have to include that when I use inetconv to create the service manifest.
For example.
I currently use proftpd for ftp with tcp_wrappers. My old inetd line was
ftp stream tcp nowait root /usr/sbin/tcpd... (2 Replies)
Discussion started by: csross
2 Replies
TCPD(8) System Manager's Manual TCPD(8)
NAME
tcpd - access control facility for internet services
DESCRIPTION
The tcpd program can be set up to monitor incoming requests for telnet, finger, ftp, exec, rsh, rlogin, tftp, talk, comsat and other ser-
vices that have a one-to-one mapping onto executable files.
The program supports both 4.3BSD-style sockets and System V.4-style TLI. Functionality may be limited when the protocol underneath TLI is
not an internet protocol.
Operation is as follows: whenever a request for service arrives, the inetd daemon is tricked into running the tcpd program instead of the
desired server. tcpd logs the request and does some additional checks. When all is well, tcpd runs the appropriate server program and goes
away.
Optional features are: pattern-based access control, client username lookups with the RFC 931 etc. protocol, protection against hosts that
pretend to have someone elses host name, and protection against hosts that pretend to have someone elses network address.
LOGGING
Connections that are monitored by tcpd are reported through the syslog(3) facility. Each record contains a time stamp, the client host name
and the name of the requested service. The information can be useful to detect unwanted activities, especially when logfile information
from several hosts is merged.
In order to find out where your logs are going, examine the syslog configuration file, usually /etc/syslog.conf.
ACCESS CONTROL
Optionally, tcpd supports a simple form of access control that is based on pattern matching. The access-control software provides hooks
for the execution of shell commands when a pattern fires. For details, see the hosts_access(5) manual page.
HOST NAME VERIFICATION
The authentication scheme of some protocols (rlogin, rsh) relies on host names. Some implementations believe the host name that they get
from any random name server; other implementations are more careful but use a flawed algorithm.
tcpd verifies the client host name that is returned by the address->name DNS server by looking at the host name and address that are
returned by the name->address DNS server. If any discrepancy is detected, tcpd concludes that it is dealing with a host that pretends to
have someone elses host name.
If the sources are compiled with -DPARANOID, tcpd will drop the connection in case of a host name/address mismatch. Otherwise, the host-
name can be matched with the PARANOID wildcard, after which suitable action can be taken.
HOST ADDRESS SPOOFING
Optionally, tcpd disables source-routing socket options on every connection that it deals with. This will take care of most attacks from
hosts that pretend to have an address that belongs to someone elses network. UDP services do not benefit from this protection. This feature
must be turned on at compile time.
RFC 931
When RFC 931 etc. lookups are enabled (compile-time option) tcpd will attempt to establish the name of the client user. This will succeed
only if the client host runs an RFC 931-compliant daemon. Client user name lookups will not work for datagram-oriented connections, and
may cause noticeable delays in the case of connections from PCs.
EXAMPLES
The details of using tcpd depend on pathname information that was compiled into the program.
EXAMPLE 1
This example applies when tcpd expects that the original network daemons will be moved to an "other" place.
In order to monitor access to the finger service, move the original finger daemon to the "other" place and install tcpd in the place of the
original finger daemon. No changes are required to configuration files.
# mkdir /other/place
# mv /usr/etc/in.fingerd /other/place
# cp tcpd /usr/etc/in.fingerd
The example assumes that the network daemons live in /usr/etc. On some systems, network daemons live in /usr/sbin or in /usr/libexec, or
have no `in.' prefix to their name.
EXAMPLE 2
This example applies when tcpd expects that the network daemons are left in their original place.
In order to monitor access to the finger service, perform the following edits on the inetd configuration file (usually /etc/inetd.conf or
/etc/inet/inetd.conf):
finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd
becomes:
finger stream tcp nowait nobody /some/where/tcpd in.fingerd
The example assumes that the network daemons live in /usr/etc. On some systems, network daemons live in /usr/sbin or in /usr/libexec, the
daemons have no `in.' prefix to their name, or there is no userid field in the inetd configuration file.
Similar changes will be needed for the other services that are to be covered by tcpd. Send a `kill -HUP' to the inetd(8) process to make
the changes effective.
EXAMPLE 3
In the case of daemons that do not live in a common directory ("secret" or otherwise), edit the inetd configuration file so that it speci-
fies an absolute path name for the process name field. For example:
ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd
Only the last component (ntalkd) of the pathname will be used for access control and logging.
BUGS
Some UDP (and RPC) daemons linger around for a while after they have finished their work, in case another request comes in. In the inetd
configuration file these services are registered with the wait option. Only the request that started such a daemon will be logged.
The program does not work with RPC services over TCP. These services are registered as rpc/tcp in the inetd configuration file. The only
non-trivial service that is affected by this limitation is rexd, which is used by the on(1) command. This is no great loss. On most sys-
tems, rexd is less secure than a wildcard in /etc/hosts.equiv.
RPC broadcast requests (for example: rwall, rup, rusers) always appear to come from the responding host. What happens is that the client
broadcasts the request to all portmap daemons on its network; each portmap daemon forwards the request to a local daemon. As far as the
rwall etc. daemons know, the request comes from the local host.
FILES
The default locations of the host access control tables are:
/etc/hosts.allow
/etc/hosts.deny
SEE ALSO
hosts_access(5), format of the tcpd access control tables.
syslog.conf(5), format of the syslogd control file.
inetd.conf(5), format of the inetd control file.
AUTHORS
Wietse Venema (wietse@wzv.win.tue.nl),
Department of Mathematics and Computing Science,
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
TCPD(8)