Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

3 votes
2 answers
1903 views
How to start a custom service
I'm very new to Linux and the solution might be easy so excuse me for that. I'm trying to run an application called EnCase Remote Recovery, which basically takes a remote image of a system. In order to that, a "servlet" must be deployed on the remote machine. I don't care if the servlet started auto...
I'm very new to Linux and the solution might be easy so excuse me for that. I'm trying to run an application called EnCase Remote Recovery, which basically takes a remote image of a system. In order to that, a "servlet" must be deployed on the remote machine. I don't care if the servlet started automatically or manually. Here is what the guide says: (P.S: the servlet name is enlinuxpc) - Method 1: To start it manually: - 1.a: Copy the servlet to the machine (Done that). - 1.b Insert the following before the STARTX command:LOAD I have no idea what that means and as far as I know STARTX is something for GUI. I tried executing this: STARTX LOAD enlinuxpc and what I get is this: /usr/bin/xterm: No absolute path found for shell: LOAD xinit: connection to x server lost - Method 2: Starting it using xinetd - 2.a: Create a configuration file named enlinuxpc in the /etc/xinetd.d directory. - 2.b: Using a text editor such as vi, insert the following text into the file, then save and close it. service enlinuxpc { socket_type = stream protocol = tcp port = 4445 type = UNLISTED wait = yes user = root server = /usr/local/encase/enlinuxpc server_args = -i -p /usr/local/encase } - 2.c: Restart the xinetd service. I've done all these steps, however the servlet still not running. 1. So how can I start it manually? 2. Is there something missing for method 2? I'm using Ubuntu.
Magio (31 rep)
Jan 17, 2015, 01:43 AM • Last activity: Apr 28, 2025, 11:01 PM
0 votes
1 answers
6229 views
TFTP: cannot send/recive file, showing Error: TFTP, Opcode: Error Code(5)
I am trying to send/receive a file using TFTP from the network switch to ubuntu(VirtualBox on Windows 10 Pro), but getting an error code 5 By following the steps mentioned below it seems like my localhost is working with TFTP server, I can send and receive the file using localhost: /home/abc# tftp l...
I am trying to send/receive a file using TFTP from the network switch to ubuntu(VirtualBox on Windows 10 Pro), but getting an error code 5 By following the steps mentioned below it seems like my localhost is working with TFTP server, I can send and receive the file using localhost: /home/abc# tftp localhost tftp> put test Sent 16 bytes in 0.0 seconds tftp> get test Received 16 bytes in 0.0 seconds root@abc:/home/abc# ls -l /var/lib/tftpboot/ total 4 -rwxrwxrwx 1 root root 14 Sep 6 18:03 test ***When I used the command in the switch to send/receive the file then I get the error message:*** ***Trivial File Transfer Protocol*** ***Opcode: Error Code (5)*** ***[Destination File: test]*** ***Error code: Access violation (2)*** ***Error message: Access violation*** ***[Expert Info (Warning/Response): TFTP ERROR packet]*** ***[TFTP ERROR packet]*** ***[Severity level: Warning]*** ***[Group: Response]*** ***Would you please guide me on how to fix this issue?*** **https://icesquare.com/wordpress/how-to-setup-tftp-on-ubuntu/** First, let’s install all the necessary packages: sudo apt-get install xinetd tftpd tftp -y Next, we need to create a configuration file: sudo nano /etc/xinetd.d/tftp Put the following content into the file. service tftp { protocol = udp port = 69 socket_type = dgram wait = yes user = nobody server = /usr/sbin/in.tftpd server_args = var/lib/tftpboot -s disable = no } In the server_args, I have var/lib/tftpboot, which represents the location of the tftp root, i.e., /var/lib/tftpboot. Notice that I skip the root /. Now let’s change the ownership of the directory: sudo mkdir /var/lib/tftpboot sudo chown -R nobody:nobody /var/lib/tftpboot sudo chmod -R 777 /var/lib/tftpboot and start the TFTP service: sudo service xinetd stop sudo service xinetd start Verify the TFTP is running correctly or not: netstat -na | grep LIST | grep 69 You should see something like this: tcp 0 0 0.0.0.0:69 0.0.0.0:* LISTEN Test: Upload a file to TFTP Server Now let’s test the TFTP server by logging into the server first: tftp localhost and upload a file: tftp> put myfile.jpg Sent 56733279 bytes in 5.7 seconds Quit: q Make sure that file has been uploaded: ls -l /var/lib/tftpboot Test: Download a file from TFTP Server Now, let’s go to a different directory and download the file we just upload. cd some_other_directory and log in to the tftp server again: tftp localhost and get the file: tftp> get myfile.jpg Received 56733279 bytes in 5.7 seconds
Passionate (1 rep)
Sep 7, 2019, 01:25 AM • Last activity: Apr 13, 2025, 04:00 PM
0 votes
0 answers
450 views
Is xinetd necessary? How to detect actual use on a running server?
I have "inherited" a CentOS 7 server on which `xinetd` is automatically started at boot. My task is to harden that server. Therefore I am wondering whether I can disable the `xinetd` service. However, this is a production machine which limits my freedom to try out things. I might break something whi...
I have "inherited" a CentOS 7 server on which xinetd is automatically started at boot. My task is to harden that server. Therefore I am wondering whether I can disable the xinetd service. However, this is a production machine which limits my freedom to try out things. I might break something while trying but I should not. So: How can I detect whether the xinetd is necessary? Which other daemons/services are configured to be started by it (I suppose that's easy, look at /etc/xinetd.d files)? Which of these have ever been started and are actively used / needed? The files in /etc/xinetd.d might just be historical or from OS packages so these may not reflect needed services. Nevertheless, here is a listing of that directory: root@server.example.org:/root -> ll /etc/xinetd.d/ total 52 -rw-------. 1 root root 1157 Apr 1 2020 chargen-dgram -rw-------. 1 root root 1159 Apr 1 2020 chargen-stream -rw-r--r--. 1 root root 2256 Aug 1 2018 check_mk -rw-------. 1 root root 1157 Apr 1 2020 daytime-dgram -rw-------. 1 root root 1159 Apr 1 2020 daytime-stream -rw-------. 1 root root 1157 Apr 1 2020 discard-dgram -rw-------. 1 root root 1159 Apr 1 2020 discard-stream -rw-------. 1 root root 1148 Apr 1 2020 echo-dgram -rw-------. 1 root root 1150 Apr 1 2020 echo-stream -rw-------. 1 root root 1212 Apr 1 2020 tcpmux-server -rw-r--r--. 1 root root 518 Apr 11 2018 tftp -rw-------. 1 root root 1149 Apr 1 2020 time-dgram -rw-------. 1 root root 1150 Apr 1 2020 time-stream PS: I know, at some point I will have to upgrade the OS itself but first things first. Additional info: The server is serving home directories to a couple of clients by NFS, acts as a router for these and forwards active directory (AD) requests. In fact, the AD functionality is the main reason I am unsure what is needed because I have yet to understand the AD communication protocol (and client/proxy/routing prerequisites). Which services might xinetd be configured for? Perhaps this output helps? root@server.example.org:/root -> netstat -tulpan | grep xinet Exit 1 root@server.example.org:/root -> lsof -c xinetd -ai Exit 1 None? I believe I have had processes not showing up in netstat and still react to incoming requests, perhaps by systemd or (x)inetd. Let's ask /proc: root@server.example.org:/root -> cat /proc/pidof xinetd/net/tcp sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode 0: 0100007F:0019 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 36323 1 ffff9012125b07c0 100 0 0 10 0 1: 00000000:007A 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 36262 1 ffff9012125b0000 100 0 0 10 0 2: 00000000:199C 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 23844 1 ffff90125ca70000 100 0 0 10 0 3: 00000000:A7E1 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 34529 1 ffff901211c58f80 100 0 0 10 0 4: 00000000:0801 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 34515 1 ffff901211c587c0 100 0 0 10 0 5: 00000000:006F 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 28319 1 ffff90125d6b0000 100 0 0 10 0 6: 00000000:4E50 00000000:0000 0A 00000000:00000000 00:00000000 00000000 0 0 18419 1 ffff901212658000 100 0 0 10 0 7: 00000000:EB51 00000000:0000 0A 00000000:00000000 00:00000000 00000000 29 0 34497 1 ffff901211c58000 100 0 0 10 0 8: A13B2BAD:007A 8AB45373:AD92 01 00000000:00000000 02:0009786D 00000000 0 0 70547 3 ffff901211c5ec80 23 4 29 10 -1 root@server.example.org:/root -> cat /proc/pidof xinetd/net/udp sl local_address rem_address st tx_queue rx_queue tr tm->when retrnsmt uid timeout inode ref pointer drops 143: 00000000:0043 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 29194 2 ffff90125f4f9100 0 144: 00000000:0044 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 36283 2 ffff90125a9a8000 0 144: 00000000:0044 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 37049 2 ffff901252cc8000 0 145: 00000000:0045 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 23877 2 ffff90125b659100 0 187: 00000000:006F 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 28317 2 ffff90125b118880 0 199: 00000000:007B 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 28979 2 ffff90125f4f8cc0 0 399: 0100007F:0143 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 28977 2 ffff90125f4f8880 0 779: 0100007F:02BF 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 34483 2 ffff900a63b51100 0 934: 00000000:035A 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 28318 2 ffff90125b118cc0 0 2125: 00000000:0801 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 34525 2 ffff900a63b50440 0 3740: 00000000:4E50 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 18417 2 ffff9012510e8440 0 8222: 00000000:DFD2 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 34528 2 ffff900a63b50880 0 8548: 00000000:2118 00000000:0000 07 00000000:00000000 00:00000000 00000000 0 0 36299 2 ffff90125a9a8440 0 9933: 00000000:E681 00000000:0000 07 00000000:00000000 00:00000000 00000000 29 0 34494 2 ffff900a63b50000 0 So, there are actually many ports it listens to? Now chkconfig output: root@server.example.org:/root -> chkconfig --list |& awk '/xinetd based services/,/""/' xinetd based services: chargen-dgram: off chargen-stream: off check_mk: on daytime-dgram: off daytime-stream: off discard-dgram: off discard-stream: off echo-dgram: off echo-stream: off tcpmux-server: off tftp: off time-dgram: off time-stream: off
Ned64 (9256 rep)
May 8, 2024, 11:50 AM • Last activity: May 8, 2024, 05:02 PM
0 votes
1 answers
262 views
xinetd: is it possible to bind service to all interfaces EXCEPT one?
I have previously asked this on ServerFault, but since it seems to get little views there, maybe there's a chance it will be better answered here... (I have deleted the post in ServerFault as indicated in the comments). I have a service that is running under xinetd. My server has many network interf...
I have previously asked this on ServerFault, but since it seems to get little views there, maybe there's a chance it will be better answered here... (I have deleted the post in ServerFault as indicated in the comments). I have a service that is running under xinetd. My server has many network interfaces, one of them is connected to external network and all others are connected to multiple internal networks. I want the service to be available to all internal networks, but not to the external one. Is it possible to do it in xinetd.conf file somehow? The "bind" option seems to do exactly the opposite: bind service to one particular interface, but not to the others. I cannot list all the interfaces (except one) explicitly in the config file, as the interfaces themselves and their IPs can change (most of them are VLAN interfaces that are added/removed on the fly). Or is the only method to firewall out the service on external interface with iptables or similar?
raj (1238 rep)
Feb 8, 2023, 08:45 PM • Last activity: Aug 24, 2023, 09:56 PM
1 votes
0 answers
270 views
Can I use inetd or xinetd as a web server?
I just want to know if it is possible to use `xinetd` as a web server to server simple piped commands. For example, I want the output of `ps -ef|grep root|wc -l` to be served over HTTP using `xinetd` (without any other server software). How can I do that?
I just want to know if it is possible to use xinetd as a web server to server simple piped commands. For example, I want the output of ps -ef|grep root|wc -l to be served over HTTP using xinetd (without any other server software). How can I do that?
Ahmad Ismail (2998 rep)
Jun 24, 2022, 11:44 AM • Last activity: Jun 24, 2022, 11:54 AM
0 votes
1 answers
697 views
Is there an alternative for xinetd that supports control characters?
I am writing a project that allows users to connect in and run specific commands. xinetd is an option but pressing `Tab` via either nc or telnet will type an indentation. Is there a net daemon that can regard `Tab` as a control character (when using telnet or other free software client)? P.S. My xin...
I am writing a project that allows users to connect in and run specific commands. xinetd is an option but pressing Tab via either nc or telnet will type an indentation. Is there a net daemon that can regard Tab as a control character (when using telnet or other free software client)? P.S. My xinetd config is like
service ctf
{
    server = /bin/bash
    port = 2333
    protocol = tcp
    type = UNLISTED
    user = root
    wait = no
    flags = NODELAY
}
Steven Yang (463 rep)
Mar 29, 2022, 04:26 PM • Last activity: Mar 31, 2022, 05:46 PM
0 votes
1 answers
129 views
Is there a way to disable reverse lookups (hostname resolving) in xinetd?
I suspect that resolving the IP address to it's hostname on each incoming connections makes my xinetd connections slow. Is there an option somewhere which would allow me to disable reverse lookups completely on xinetd? Thank you.
I suspect that resolving the IP address to it's hostname on each incoming connections makes my xinetd connections slow. Is there an option somewhere which would allow me to disable reverse lookups completely on xinetd? Thank you.
Arkadiy Bolotov (111 rep)
Dec 28, 2021, 04:42 AM • Last activity: Dec 28, 2021, 08:23 AM
8 votes
4 answers
70548 views
Telnet connection had been closed by a foreign host
The `client PC IP: 10.49.46.5/24` and the `server PC IP: 10.49.46.2/24` are two computers linked to the same network. When I try to create an interactive communication between these two computers using the command `telnet`, I get the following: [root@xxx:~]# telnet 10.49.46.2 Trying 10.49.46.2... Co...
The client PC IP: 10.49.46.5/24 and the server PC IP: 10.49.46.2/24 are two computers linked to the same network. When I try to create an interactive communication between these two computers using the command telnet, I get the following: [root@xxx:~]# telnet 10.49.46.2 Trying 10.49.46.2... Connected to 10.49.46.2. Escape character is '^]'. Connection closed by foreign host. [root@xxx:~]# The server xinetd.conf are as follows: defaults { instances = 60 log_type = SYSLOG authpriv log_on_success = HOST PID EXIT log_on_failure = HOST ATTEMPT cps = 25 30 } includedir /etc/xinetd.d The server telnet.config are as follows: service telnet { flags = REUSE socket_type = stream wait = no user = root server = /usr/sbin/telnetd log_on_failure += USERID instances = 10 disable = no } The TCPWrapper hosts.allow are: telnetd: /etc/telnetd.hosts tfdpd: /etc/tftpd.hosts sshd: /etc/sshd.hosts The TCPWrapper hosts.deny are: ALL:ALL NOW: 1. I checked ssh and it is running on port 22. 2. I checked /var/log/message and had found that the command xinetd starts and then exits the telnet immediately. 3. I checked that iptables do not drop telnet package using the command: iptables -L Would you please help me figure out what is the problem and how can I fix it?
Yuri (81 rep)
Sep 23, 2017, 08:12 AM • Last activity: Nov 22, 2021, 11:23 AM
1 votes
0 answers
251 views
After restarting xinetd service, rsh shows "poll: protocol failure in circuit setup"
I have searched a lot in various forums and most indicate that the solution is to open ports in the firewall or restart the `xinetd` service. Although that may be the solution in some cases, I think the problem is another and is still pending solution. I have Red Hat 6, `iptables` service is off, an...
I have searched a lot in various forums and most indicate that the solution is to open ports in the firewall or restart the xinetd service. Although that may be the solution in some cases, I think the problem is another and is still pending solution. I have Red Hat 6, iptables service is off, and I have not modified the executables rshd/rsh. Initially, when I start the system, rsh works fine: # rsh localhost pwd /root If I simply restart the service "xinetd", I get the known message "poll: protocol failure in circuit setup": # service xinetd restart Stopping xinetd: [ OK ] Starting xinetd: [ OK ] # rsh localhost pwd poll: protocol failure in circuit setup I have only been able to fix the problem in two ways: rebooting the system or going through level 2. # init 2; sleep 1; init 3 # rsh localhost pwd /root I'd like to reach the root cause. It is not a firewall problem. **This is the strace output when it fails:** (see highlighted passage)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(1023), in_addr=inet_addr("0.0.0.0")}, 16) = 0
fcntl(3, F_SETOWN, 23277)               = 0
connect(3, {sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(1022), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(4, 1)                            = 0
write(3, "1022\0", 5)                   = 5
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, -1) = 1 ([{fd=3, revents=POLLIN|POLLERR|POLLHUP}])
write(2, "poll: protocol failure in circui"..., 40) = 40
close(4)                                = 0
close(3)                                = 0
rt_sigprocmask(SIG_SETMASK, [], [URG], 8) = 0
exit_group(1)
**This is the strace output when it works fine:** (see highlighted passage)
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3
bind(3, {sa_family=AF_INET, sin_port=htons(1023), in_addr=inet_addr("0.0.0.0")}, 16) = 0
fcntl(3, F_SETOWN, 24718)               = 0
connect(3, {sa_family=AF_INET, sin_port=htons(514), sin_addr=inet_addr("127.0.0.1")}, 16) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(1022), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
listen(4, 1)                            = 0
write(3, "1022\0", 5)                   = 5
poll([{fd=3, events=POLLIN}, {fd=4, events=POLLIN}], 2, -1) = 1 ([{fd=4, revents=POLLIN}])
accept(4, {sa_family=AF_INET, sin_port=htons(1020), in_addr=inet_addr("127.0.0.1")}, ) = 5
close(4)                                = 0
writev(3, [{"root\0", 5}, {"root\0", 5}, {"pwd\0", 4}], 3) = 14
read(3, "\0", 1)                        = 1
rt_sigprocmask(SIG_SETMASK, [], [URG], 8) = 0
setuid(0)                               = 0
rt_sigprocmask(SIG_BLOCK, [INT QUIT TERM], [], 8) = 0
rt_sigaction(SIGINT, {SIG_IGN, [INT], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGINT, {0x2abd2db30080, [INT], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, {SIG_IGN, [INT], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN, [QUIT], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGQUIT, {0x2abd2db30080, [QUIT], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, {SIG_IGN, [QUIT], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN, [TERM], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, {SIG_DFL, [], 0}, 8) = 0
rt_sigaction(SIGTERM, {0x2abd2db30080, [TERM], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, {SIG_IGN, [TERM], SA_RESTORER|SA_RESTART, 0x2abd2e3c1920}, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0x2abd2eb893b0) = 24721
ioctl(5, FIONBIO, )                  = 0
ioctl(3, FIONBIO, )                  = 0
rt_sigprocmask(SIG_SETMASK, [], [INT QUIT TERM], 8) = 0
select(6, [3 5], NULL, NULL, NULL)      = 1 (in )
read(3, "/root\n", 8192)                = 6
write(1, "/root\n", 6)                  = 6
select(6, [3 5], NULL, NULL, NULL)      = 1 (in )
read(3, "", 8192)                       = 0
select(6, , NULL, NULL, NULL)        = 1 (in )
read(5, "", 8192)                       = 0
kill(24721, SIGKILL)                    = 0
exit_group(0)                           = ?
Thank you in advance for your help. Best regards, Octavio
Octavio Rodriguez Perez (11 rep)
Feb 14, 2021, 11:28 PM • Last activity: Feb 22, 2021, 03:22 PM
0 votes
1 answers
221 views
xinetd + shell script echoing flags in TCP packet
I'm trying to create a script that replicates a JSON status response from a Minecraft server (https://wiki.vg/Server_List_Ping). I've currently set up `xinetd` to execute a shell script that echos a preset back, but I'm having trouble crafting the TCP packet. For some reason it returns whatever come...
I'm trying to create a script that replicates a JSON status response from a Minecraft server (https://wiki.vg/Server_List_Ping) . I've currently set up xinetd to execute a shell script that echos a preset back, but I'm having trouble crafting the TCP packet. For some reason it returns whatever comes after echo, ignoring any flags. Here's a stripped down case that replicates the issue: /usr/bin/mc
#!/bin/sh

# hello!
echo -en "\x68\x65\x6c\x6c\x6f\x21"
/etc/xinetd.d/minecraft
service minecraft
{
  type = UNLISTED
  instances = 20
  socket_type = stream
  protocol = tcp
  wait = no
  user = root
  group = root
  server = /usr/bin/mc
  port = 25565
  disable = no
}
TCP reply data as seen from the client that initiated the request:
00000000: 2d65 6e20 5c78 3638 5c78 3635 5c78 3663  -en \x68\x65\x6c
00000010: 5c78 3663 5c78 3666 5c78 3231 0a         \x6c\x6f\x21.
Do I need to read the client request first, or is echo aliased to something else if called from xinetd?
gupti (3 rep)
Dec 13, 2020, 01:50 AM • Last activity: Dec 13, 2020, 02:38 AM
0 votes
0 answers
240 views
logrotate script for xinetd postrotate
I need help with rotating my xinetd.log file. I'm using CentOS8 and I have this logrotate file: /var/log/xinetd.log { compress dateext daily rotate 7 missingok copytruncate postrotate /etc/init.d/xinetd reload endscript } But I get "postrotate error" or something, I lost the logs when running the de...
I need help with rotating my xinetd.log file. I'm using CentOS8 and I have this logrotate file: /var/log/xinetd.log { compress dateext daily rotate 7 missingok copytruncate postrotate /etc/init.d/xinetd reload endscript } But I get "postrotate error" or something, I lost the logs when running the debug. But I know the post rotate won't work. My main problem is how do I create a post rotate to restart the xinetd service after the rotation?
Gwynn (41 rep)
Aug 11, 2020, 01:32 AM
2 votes
1 answers
11193 views
Centos7: Starting xinetd service with systemd
I have a xinetd service from Centos6 and I want to port to Centos7 ie create a systemd service # cat /etc/xinetd.d/br_rsh # default: on # description: The rshd server is the server for the rcmd(3) routine and, \ # consequently, for the rsh(1) program. The server provides \ # remote execution facilit...
I have a xinetd service from Centos6 and I want to port to Centos7 ie create a systemd service # cat /etc/xinetd.d/br_rsh # default: on # description: The rshd server is the server for the rcmd(3) routine and, \ # consequently, for the rsh(1) program. The server provides \ # remote execution facilities with authentication based on \ # privileged port numbers from trusted hosts. service brshell { port = 591 socket_type = stream wait = no user = root log_on_success += USERID log_on_failure += USERID server = /usr/sbin/in.br_rshd disable = no } If i understood correctly, i need to break down the above file to two parts: one for brshell.socket and another for brshell.service. Then, I need to execute systemctl enable brshell.socket (what about brshell.service?) What would these files look like and Where would these files go under? Thank you
ealeon (193 rep)
May 1, 2018, 02:59 PM • Last activity: Mar 26, 2019, 02:33 PM
0 votes
0 answers
38 views
Question on scalability of echo service on Linux
I'm trying to build a service which verifies that a network route is available. I have used the echo service on inetd in the past and it certainly fits the purpose but i am unsure about its scaling. Anyone ever tried to use echo for something like 50K clients? Any alternative ideas since ICMP not an...
I'm trying to build a service which verifies that a network route is available. I have used the echo service on inetd in the past and it certainly fits the purpose but i am unsure about its scaling. Anyone ever tried to use echo for something like 50K clients? Any alternative ideas since ICMP not an option and i have a RHEL7 server to utilize?
Georgios Vasilakis (1 rep)
Feb 5, 2019, 01:00 PM
8 votes
2 answers
5015 views
systemd "socket activation" vs xinetd
I use `xinetd` and it works for my purposes. However I recently discovered that systemd has something built in called "socket activation". These two seem very similar, but systemd is "official" and seems like the better choice. *However before using it, are they really the same? Are there difference...
I use xinetd and it works for my purposes. However I recently discovered that systemd has something built in called "socket activation". These two seem very similar, but systemd is "official" and seems like the better choice. *However before using it, are they really the same? Are there differences I should be aware of?* For example, I want to start some dockerised services only when they are first requested - my first thought would be to use xinetd. But is socket activation better / faster / stabler / whatever?
lonix (1965 rep)
Sep 23, 2018, 01:39 PM • Last activity: Sep 23, 2018, 02:05 PM
2 votes
1 answers
723 views
xinetd cannot launch lighttpd
I want to launch `lighttpd` when someone tries to connect to port 80. I started with a simple test script to see if anything was working: `/etc/xinetd.d/www` service www { disable = no socket_type = stream protocol = tcp port = 80 log_on_success += USERID log_on_failure += USERID server = /usr/serve...
I want to launch lighttpd when someone tries to connect to port 80. I started with a simple test script to see if anything was working: /etc/xinetd.d/www service www { disable = no socket_type = stream protocol = tcp port = 80 log_on_success += USERID log_on_failure += USERID server = /usr/server_test.sh user = root instances = UNLIMITED wait = no log_type = SYSLOG daemon debug } where /usr/server_test.sh: #!/bin/sh echo "www connection" lighttpd -D -f /usr/lighttpd.conf & webconfig -c /usr/cppcms.js & service xinetd restart When I try: nc localhost 80 I get: www connection 2013-11-25 16:37:13: (network.c.345) can't bind to port: 80 Address already in use How do I get xinetd and lighttpd to work together, not fight over same port?
JakobJ (157 rep)
Nov 29, 2013, 10:46 AM • Last activity: Feb 22, 2018, 12:10 PM
2 votes
0 answers
1201 views
How can I install rexecd on Ubuntu
I tried to install rexecd executing this codes: apt-get install xinetd apt-get install rsh-server But, following the steps found on a web page, I try access to `/etc/xinetd.d/rsh`, `/etc/xinetd.d/rlogin` and `/etc/xinetd.d/rexec`, I can't find them, so I can't configure them. What can I do for insta...
I tried to install rexecd executing this codes: apt-get install xinetd apt-get install rsh-server But, following the steps found on a web page, I try access to /etc/xinetd.d/rsh, /etc/xinetd.d/rlogin and /etc/xinetd.d/rexec, I can't find them, so I can't configure them. What can I do for install rexecd?
Iratzar Carrasson Bores (21 rep)
Oct 11, 2017, 08:54 AM • Last activity: Oct 11, 2017, 10:03 AM
1 votes
0 answers
1014 views
Launching Xvnc server with xinetd, wrapped with vglrun
I'm trying to set up remote login for the CentOS 7 machine in our office, so that users can connect using TigerVNC from windows clients and reach a gdm login screen. Previously, I followed [these instructions][1] to use XDMCP and everything worked as expected: anyone on the local network could conne...
I'm trying to set up remote login for the CentOS 7 machine in our office, so that users can connect using TigerVNC from windows clients and reach a gdm login screen. Previously, I followed these instructions to use XDMCP and everything worked as expected: anyone on the local network could connect to server on port 5950 and they would reach a gdm greeter screen where they could login. However, that was with the nouveau graphics driver and unfortunately the CAD software we use requires nVidia drivers (and we also need to use this remotely). After installing the nvidia drivers and verifying that everything (gnome, CAD software etc.) seems to run fine on the server, I discovered that remote login no longer worked: connecting with TigerVNC reaches an error screen "Oh no! Something has gone wrong". I believe this is because Gnome requires 3D acceleration, and the nVidia graphics driver does not work properly with this. So I tried VirtualGL and found that I could now start a vnc server and run 3D applications with vglrun:
$ vglrun vncserver
Actually, because of this issue I also had to prepend ssh-agent to the command:
$ /usr/bin/ssh-agent vglrun vncserver
vncserver has a launch script in ~/.vnc/xstartup which I can edit so that the vglrun command is run before Xvnc, and so users could connect with ssh and start their own vnc servers. But I want to use xinetd for convenience, **however I don't know how to configure the xinetd service to run Xvnc with ssh-agent and vglrun**. This is my initial configuration, saved to /etc/xinetd.d/xvncserver:
service vnc
{
   disable = no
   log_type = SYSLOG daemon debug
   protocol = tcp
   socket_type = stream
   wait = no
   user = nobody
   server = /usr/bin/Xvnc
   server_args = -inetd -query localhost -once -geometry 1024x768 -depth 24 securitytypes=none
   # server = /usr/bin/ssh-agent
   # server_args = vglrun /usr/bin/Xvnc -inetd -query localhost -once -geometry 1024x768 -depth 24 securitytypes=none
}
The above config results in the "something went wrong" error on the VNC screen (presumably because gnome failed to start). I tried replacing the commented lines so server = /usr/bin/ssh-agent, and everything else is in the server_args, but this resulted in the TigerVNC client being unable to connect, reporting "reading version failed: not an RFB server?". **How can I configure my xinetd server to launch Xvnc properly with vglrun (and ssh-agent)?**
spaceghost (111 rep)
Aug 29, 2017, 01:55 AM • Last activity: Aug 29, 2017, 06:02 AM
3 votes
2 answers
1955 views
Bash tcp redirection end of transmission
I made a simple network service with xinetd which reads a string from tcp socket and outputs its encoded view. Original binary(qrencode) just reading stdin. It works fine when I use it with `netcat` as `echo string | nc ` But it doesn't answer when I try to use it via bash tcp redirection. exec 7 /d...
I made a simple network service with xinetd which reads a string from tcp socket and outputs its encoded view. Original binary(qrencode) just reading stdin. It works fine when I use it with netcat as echo string | nc But it doesn't answer when I try to use it via bash tcp redirection. exec 7/dev/tcp// echo string >&7 cat <&7 It waits forever. I tried echoing \004, cat /dev/null to this fd and no luck. How can I make it working?
doublebind (31 rep)
Jun 19, 2017, 06:41 PM • Last activity: Jun 21, 2017, 11:57 AM
3 votes
1 answers
433 views
What services accept tcp connection?
I've been learning about socket programming recently, and am just beginning learning about tcp/ip sockets. [My study material][1] gives an example of connecting to the localhost `daytime` service by running `telnet 127.0.0.1 13` with the expected result that a telnet session should be opened. I have...
I've been learning about socket programming recently, and am just beginning learning about tcp/ip sockets. My study material gives an example of connecting to the localhost daytime service by running telnet 127.0.0.1 13 with the expected result that a telnet session should be opened. I have an entry for "daytime 13/tcp" in my /etc/services file, and I have the xinetd service running, but when I try the telnet command, I immediately get "Connection refused". **Q**: why doesn't telnetting to the daytime service work? **Q**: are there other localhost services that would accept a telnet connection? I tried to telnet to a random selection of services that had tcp entries in /etc/services, but all of them gave the same "Connection refused" error. My short-term goal is just to replicate my study material's successful telnet connection to a localhost tcp service - if not inetd, then anything else; I just want to learn by practice. >telnet 127.0.0.1 13 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused >telnet 127.0.0.1 49000 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused >telnet 127.0.0.1 9009 Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused >uname -a Linux linuxbox 3.11.10-301.fc20.x86_64 #1 SMP Thu Dec 5 14:01:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
StoneThrow (1937 rep)
Jun 13, 2017, 05:34 PM • Last activity: Jun 17, 2017, 11:53 AM
3 votes
1 answers
5186 views
How do I launch the daytime service?
Whenever I think I'm getting comfortable with Linux, I get stumped by a simple problem that exposes my inexperience: how do I launch the `daytime` service? My trail of attempts is as follows: >sudo systemctl start daytime Failed to issue method call: Unit daytime.service failed to load: No such file...
Whenever I think I'm getting comfortable with Linux, I get stumped by a simple problem that exposes my inexperience: how do I launch the daytime service? My trail of attempts is as follows: >sudo systemctl start daytime Failed to issue method call: Unit daytime.service failed to load: No such file or directory. >which daytime /usr/bin/which: no daytime in (/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/home/user/utils/:/home/user/.local/bin:/home/user/bin:/home/user/utils/:/home/user/utils/:/home/user/utils/:/home/user/.local/bin:/home/user/bin:/home/user/utils/) >locate daytime /etc/xinetd.d/daytime-dgram /etc/xinetd.d/daytime-stream >sudo systemctl start daytime-stream Failed to issue method call: Unit daytime-stream.service failed to load: No such file or directory. >systemctl status xinetd xinetd.service - Xinetd A Powerful Replacement For Inetd Loaded: loaded (/usr/lib/systemd/system/xinetd.service; enabled) Active: active (running) since Mon 2017-06-12 18:10:28 PDT; 16h ago Process: 5005 ExecStart=/usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid $EXTRAOPTIONS (code=exited, status=0/SUCCESS) Main PID: 5006 (xinetd) CGroup: /system.slice/xinetd.service /usr/sbin/xinetd -stayalive -pidfile /var/run/xinetd.pid >uname -a Linux linuxbox 3.11.10-301.fc20.x86_64 #1 SMP Thu Dec 5 14:01:17 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux I have a very shaky understanding that there is some relationship between xinetd and daytime, but, e.g., I don't understand if the fact that the xinetd service is running means that daytime is/should also be running, or if I need to start it independently? If I am supposed to start it independently, then how can I? I'm out of ideas after my above-noted attempts all failed.
StoneThrow (1937 rep)
Jun 13, 2017, 06:11 PM • Last activity: Jun 17, 2017, 11:52 AM
Showing page 1 of 20 total questions