date
int64
1,220B
1,719B
question_description
stringlengths
28
29.9k
accepted_answer
stringlengths
12
26.4k
question_title
stringlengths
14
159
1,628,980,198,000
I have an external USB disk with ext4 unencrypted: /dev/sda1 3.6T 2.9T 613G 83% /data I wish to encrypt this disk without losing data. I migrated this disk from Raspberry3 to Raspberry4, because of better performance I now wish to encrypt. I read about Filesystem stacked level encryption and Block device-lev...
It's possible, but with all in-place conversions, there is a certain risk of data loss. To make room for the LUKS header, unless you intend to use an external header, you must first shrink the filesystem (with resize2fs if it's ext4). For LUKS1, you should shrink it by 2MiB. For LUKS2, you can shrink it by 4M, 16M or ...
How to encrypt an external disk without backing-up/restoring the existing data?
1,628,980,198,000
So I'm installing a new Arch with the document here for a whole system encryption. The first part I get confused is here which the document wrote: Warning: GRUB does not support LUKS2. Do not use LUKS2 on partitions that GRUB needs to access. But in the later part of the section, it told me to run the command crypts...
Create a partition on beginning of your Hard Disk Drive, it's size should be between 600 MB and 1GB, and in Linux setup mark that partition as /boot partition. You shouldn't encrypt the boot partition as none of your potentially sensitive data will be written to it. If you want to wipe the entire Hard Disk Drive befo...
Can't boot Arch Linux after installation with dm-crypt whole system encryption (BIOS)
1,628,980,198,000
I have a triple boot setup (3xLinux). All Linuces share /home and swap, and their / partitions are next to each other. All reside in an LVM on LUKS: # lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme0n1 259:0 0 951.8G 0 disk |-nvme0n1p1 259:1 0 800M 0...
Start Your system with the rd.debug (init-ramdisk debug) kernel flag added. This should shed some light on what is going wrong. If You have it You kan bost the last one or two screens with xtrace output if You cannot the the problem Yourself then. You can also direct the output to files in addition (i.e. add rd.log=...
LVM on LUKS FDE: GRUB won't mount my root partition / during boot even though cryptomount and cryptdevice are given in grub.cfg
1,628,980,198,000
I have an almost fresh Kali linux installation in an Hyper-V virtual machine. It is configured with hard disk encryption during installation. After some working days, I reduced the amount of RAM memory reserved for the VM, but when I boot up the reconfigured machine, the password used to decrypt the hard drive is repo...
LUKS2 by default uses the argon2 key derivation function which is so called memory hard -- it intentionally uses a lot of RAM (up to 1 GiB with cryptsetup) when unlocking the device to prevent brute force attacks on GPUs. Exact amount of RAM it requires depends on the amount of RAM you have when creating the LUKS devi...
Linux Hard drive encryption password invalid after memory size change
1,628,980,198,000
I have a strange problem I don't understand. I have a Kubuntu 19.04 installation that has a guided install of an encrypted LVM root. lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 465,8G 0 disk └─sda1 8:1 0 465,8G 0 part sdb ...
The syntax of the PARTUUID values indicates your disks are probably using MBR partitioning and classic BIOS-style boot. And the symptoms suggest that your bootloader is actually written onto sda rather than sdb, even though your /boot partition is sdb1. This is because in BIOS-based systems, the OS installer cannot ne...
Encrypted LVM not Booting When Demount unaffected HDD
1,628,980,198,000
I tried to delete all files named "Thumbs.db" with something like $ rm -rd /path/to/hdd/decrypted/folder/* --name Thumbs.db but it just started deleting in alphabetical order. Now, I have to recover the files, which are still on the HDD, but they're encrypted and I meanwhile shut down my computer and unplugged the...
At first, you should never mount your disk read-write during the recovery. Then you may copy the decrypted device (in /dev/mapper/foo-crypt) to an unencrypted device if you have some tools which only work with real disks. For usual linux utilities /dev/mapper/foo-crypt) should be okay. Then testdisk and photorec are g...
How to rescue files after $ rm -rd ./* on encrypted, external HDD?
1,628,980,198,000
Recently I added a new disk to my computer. I had a free SATA slot, so nothing else changed. A few days after the disk was inserted the computer stopped to boot. I use Debian Bookworm. I have an encrypted partition which contains a LVM with several virtual partitions, including the root partition. Usually after Grub I...
It turned out that by adding a second disk the drive letters changed. The disk containing the root file system was /dev/sda before but became /dev/sdb. This made it impossible for the system to decrypt the root partition. Please note that Grub was fine, it loaded the Kernel correctly. Thus all attempts to repair the s...
Full disk encryption stopped to boot a few days after adding a second disk
1,628,980,198,000
I wanted to encrypt a flash drive but it didn't went well. Then I tried to remove the encryption but I am unable to do it. Here is some info: LUKS header information Version: 2 Epoch: 4 Metadata area: 16384 [bytes] Keyslots area: 16744448 [bytes] UUID: 9f4cbeda-4733-4aa9-873f-764705300bee ...
You cannot "remove" LUKS encryption AFAIK, you need to format/recreate your partition. Steps to convert it back to a normal USB drive: sudo unmount /mount/point sudo cryptsetup close /dev/mapper/name cat /dev/zero > /dev/device1 sudo mkfs.ext4 /dev/device1 (or mkfs.exfat/mkfs.vfat/mkfs.ntfs) The cat command is not st...
Remove Cryptsetup LUKS encryption [duplicate]
1,628,980,198,000
I'm trying to setup grub to boot from encrypted /boot on BTRFS based RAID1 array. However, I'm cannot find a way to force grub to unlock both disks. GRUB asks for key twice to unlock /boot, but I don't know how to ask it to unlock two cryptdevices after that. Here the boot process: Unlock /dev/sda2: Unlock /dev/sdb2:...
Working advice from reddit: Find the encrypt boot hook (the one that is bundled inside your initramfs) copy it and create encrypt2 from it. Remove some sanitation lines from it (like clearing some files or folders) add encrypt2 to your hooks (mkinitcpio.conf(5)), encrypt2_* arguments to your kernel cmdline, rebuild t...
Grub with encrypted /boot and / on btrfs RAID1?
1,628,980,198,000
In my root folder, it shows i only have 15 GB of space available. When opening Gparted, it shows an 950 gb encrypted partition. How come i only have 15GB available in my root directory? Update: This question has already been answered, but i reworded it to better fit the community.
Your root partition is only 15G. The rest of the volume has not been allocated. Make another partition (using the mapped name of the encrypted disk) to access the rest of the disk. https://wiki.archlinux.org/index.php/Disk_encryption#Block_device_encryption
Wheres all my disk space? I encrypted a partition [closed]
1,461,595,270,000
I have a problem with the wpa_supplicant program. My problem is about the use of wpa_cli which needs wpa_supplicant. Error when I'm executing sudo wpa_cli: Could not connect to wpa_supplicant The manual start of wpa_supplicant gives me some errors: sudo wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.c...
Finally, the written errors didn't affect the system. My /etc/network/interfaces file looks like (only wlan part) : iface wlan0 inet static address 192.168.2.1 netmask 255.255.255.0 pre-up wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf -B With this config, I can use the sudo wpa_cli co...
WiFi error wpa_supplicant
1,461,595,270,000
I have to connect to a WPA2 Enterprise network which only works if I don't verify the certificate. I would prefer not to do this, because this way anyone can see the MSCHAPv2 messages. The first step to fixing this would be looking at the certificate offered by the AP, then configuring wpa_supplicant to only trust tha...
You could use Wireshark to dump the handshake, then convert the binary data to PEM with openssl, as suggested by @grawity in a similar question at superuser: Sadly, wpa_supplicant doesn't have an option to dump the certificates even in debug mode. (I'll update this if I find a better way.) You can still monitor the a...
How to view the WPA2 PEAP certificate offered by an AP?
1,461,595,270,000
tl;dr After reading the Arch wiki articles on installation, wireless setup and WPA supplicant, trying the suggestions below and a host of forum threads, I'm unable to get either of the following cards to connect to my wireless network when booting the Arch Linux 2013-09-01 ISO: Edimax Technology Co., Ltd EW-7811Un 80...
It seems like the main problem is the BT Home Hub version 4 which came with the Internet subscription. After disabling 5 GHz wireless, WPS, 802.11 n, automatic channel selection and setting security to WPA2 only, I'm now able to get a connection within seconds in both Ubuntu and Windows, and a very sketchy connection ...
How to connect to Wi-Fi network in Arch Linux?
1,461,595,270,000
I'm trying to set the debug level of wpa_cli using the level command. It doesn't matter if I use interactive mode or direct commands the level command always fails. wpa_cli -i wlan0 level 1 => FAIL And interactive mode: wpa_cli wpa_cli v2.3 Copyright (c) 2004-2014, Jouni Malinen <[email protected]> and contributors ...
From the Interactive mode type log_level: > log_level Current level: INFO Timestamp: 0 Then type log_level debug : > log_level debug OK Verify using the command log_level : > log_level Current level: DEBUG Timestamp: 0
wpa_cli level command always fails
1,461,595,270,000
I want to be sure that whatever string I pass into the line wpa-ssid "abc" in /etc/network/interfaces won't be used to break out of the configuration. All I can find in the manual is that \ can be used at the end of a line to continue on the next line. But what about \" in the middle of a line? My worries is an SSID s...
In Debian's /etc/network/interfaces (or any other distribution using Debian's ifupdown utility), a backslash-newline sequence is removed, and backslash is not special anywhere else. A double quote character is not special either. The character # starts a comment if it's the first non-whitespace character on a (non-con...
escape characters in /etc/network/interfaces
1,461,595,270,000
When trying to connect to a network (specifically a WPA2 enterprise network for a university) with wpa_supplicant on Gentoo Linux, the network is shown as disabled when the flag is not set. My wpa_supplicant.conf : ctrl_interface=/var/run/wpa_supplicant network={ ssid="TheNetwork" eap=PEAP identity="redac...
When you declare a network block in wpa_supplicant.conf, the default value for key_mgmt is WPA-PSK IEEE8021X (config.c sets to DEFAULT_KEY_MGMT, definition of DEFAULT_KEY_MGMT). Later on, when checking if a network is “disabled”, one of the checks is for whether the block has key_mgmt=WPA-PSK but does not have psk= se...
wpa_supplicant says network is disabled
1,461,595,270,000
I installed a command-line QR-code generator: apt install qrencode I used the following format, so the QR scanner knows what to do with the content: WIFI:T:WPA;S:<your Wi-Fi network name>;P:<your Wi-Fi network password>;; generating the QR image file then works like this: qrencode "WIFI:T:WPA;S:My_Network;P:My_very_...
The command line work properly , special characters are allowed in the SSID (doesn't need to be escaped) but in the password it should be escaped.
Generate a QR-code to log into Wireless (wifi) with WPA encryption
1,461,595,270,000
When we execute command wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf for connecting to AP, wpa_supplicant follows following steps: 1. wpa_supplicant requests the kernel driver to scan neighboring BSSes 2. wpa_supplicant selects a BSS based on its configuration 3. wpa_supplicant requests the kernel driver t...
The wpa_supplicant need to gather some information about an AP ( availability , ESSID, BSSID ,Freq , security , channel ...) , for every connect request it will invoke some functions to update the BSS table. Without the BSS table update the wpa_supplicant can't handle any change on an AP, so it is not possible to skip...
Skip scanning in wpa_supplicant
1,461,595,270,000
I'd like to connect to wireless network via command line in Linux. When doing it I've stuck with this issue: $ wpa_passphrase NETWORK_SSID NETWORK_PASSWORD Passphrase must be 8..63 characters The NETWORK_PASSWORD has only five characters. Via smartphone there is no problem with connection. Could you help me to solv...
wpa_passphrase is used for generating keys for automatic WPA connections. If you want a manual one time from the command line setup use iwconfig wlan0 essid NETWORK_ID key WIRELESS_KEY
wpa_passphrase must be 8..63 characters
1,461,595,270,000
I just installed Arch Linux on my laptop. So far I have only been able to connect to wired networks. When I try to connect to my wifi network with wpa_supplicant -D nl80211,wext -i wlp3s0 -C <(wpa_passphrase "SKYNET-5GHz" < password.txt) I get this error: Successfully initialized wpa_supplicant Could not unlink existi...
According to wiki.archlinux You can use one connection manager because: you should not run two daemons simultaneously netctl is installed by default, i think you are using a GUI like Network-manager. Remove netctl and Network-manager Reinstall Network-Manager Try to connect through wpa_supplicant
Cannot connect to wifi with wpa_supplicant
1,461,595,270,000
I'm trying to connect to a WiFi with WPA-EAP, but it always fails with error: failure to add network: invalid message format Full log from journalctl: NetworkManager[668]: <info> device (wlp5s0): Activation: starting connection 'eduroam' (1ed02f15-9f55-452c-9b1c-4b2670bb2eac) NetworkManager[668]: <info> audit: op="...
The problem was solved by removing this line: anonymous-identity= from /etc/NetworkManager/system-connections/conname.
Can't connect to WiFi with WPA-EAP
1,461,595,270,000
I'm brand new to server configuration. I'm just a developer, so forgive me if I don't understand what you're talking about, if I haven't posted enough information, or if I don't understand your terminology. You should know that my SSID is hidden. I have confirmed both the SSID and passkey are correct on a computer th...
You are missing the wpasupplicant package. You need to install it properly first. You can do it with apt-get as below: apt-get install wpasupplicant Make sure it is properly installed. And then to be on the safe side, put double quotes around the values like following and try again: wpa-ssid "mySSID" wpa-psk "myHashe...
Failure starting Wlan connection with wpa_supplicant?
1,461,595,270,000
I'm not able to use wpa_supplicant to set the essid and other parameters on the wireless interface. Using -Dwext throws ioctl[SIOCSIWENCODEEXT] $ sudo wpa_supplicant -B -i wlan0 -Dwext -c universitywpa Successfully initialized wpa_supplicant ioctl[SIOCSIWENCODEEXT]: Invalid argument ioctl[SIOCSIWENCODEEXT]: Invalid...
I ended up removing the -B (run daemon in background) sudo wpa_supplicant -i wlan0 -c wpaconfig -D nl80211,wext and realize that my script wasn't waiting for the connection to complete: wlan0: CTRL-EVENT-CONNECTED - Connection to 00:11:22:33:44:55 completed [id=0 id_str=] and was aborting early due to not seeing the ...
wpa_supplicant unable to set essid and other parameters from config file
1,461,595,270,000
I just reinstalled ArchLinux on my Thinkpad. I am a bit puzzled that the network-manager-applet only supports WEP encryption for wifi networks. I already installed wpa_supplicant and wireless_tools as suggested elsewhere on the internet. 0 ✓ user@alcor ~ $ pacaur -Qs network local/libnm-glib 1.4.4-1 NetworkManage...
Ok I was confusing two things: (1) creating new networks with the network-manager-applet only supports unencrypted or WEP encryption, as shown in the screenshot above. (2) Connecting to WPA secured wi-fi networks works with wireless_tools and wpa_supplicant installed. However, it did not work in my case because I was ...
How to enable WPA/WPA2 in NetworkManager?
1,461,595,270,000
I notice WPA_GUI has saved my WiFi password to /etc/wpa_supplicant/wpa_supplicant.conf. The unit I'm trying to set up is a shared use system on enterprise WiFi that logs on with a user's account, so leaking the password between users is a very bad thing. There's no option in WPA_GUI to not save the password. How ca...
We ended up using a wired network -- at the same time as I was failing to get NetworkManager/nm-applet working we got permission to plug the Pis in to the network. However I know from Xubuntu that nm-applet can connect to WPA2/PEAP and prompt for a password every time, so this should be the solution.
Connect to WiFi without storing password (Raspbian)
1,461,595,270,000
airodump-ng --ivs --channel 1 --write output --bssid VV:II:CC:TT:II:MM mon0 https://en.wikipedia.org/wiki/Initialization_vector Question: If we use "--ivs" to make smaller outputs, will we be still able to crack WPA?
Yes, you will still be able to crack WPA. -i or --ivs is used to only save IVs, which is only useful for cracking anyway.
Using "--ivs" is a good way for making a smaller output?
1,461,595,270,000
I start hostapd for wpa3 only auth. interface=wlan0 bridge=br0 driver=nl80211 ssid=mysid hw_mode=g channel=6 wpa=2 wpa_passphrase=iforgotit wpa_key_mgmt=SAE rsn_pairwise=CCMP But when I do the scan nmcli device wifi list it report...WEP! nmcli device wifi list IN-USE BSSID SSID MODE CHAN RAT...
Solution found: my hardware don't support wpa3 as AP If I configure it as WPA2 the WEP disappear and WPA2 appear. I prefer wpa3, but wpa2 is better than wep. Another solution which works (On Slackware 15 with kernel 6.3 and module rtw_8821cu with this hardware) wpa2 conf interface=wlan2 bridge=br0 driver=nl80211 ssid=...
hostapd: I want wpa3 only..but enable WEP!
1,461,595,270,000
Is it possible to deactivate wpa_cli notifications/messages like <3>WPS_AP_AVAILABLE? Because it spams it, and in a VT where you have to slowly type MACs@ and bssIDs, it's really hard with those bothering messages
Sadly, no. This function is responsible for deciding if events sent from wpa_supplicant to wpa_cli are written to the interactive terminal. static int wpa_cli_show_event(const char *event) { const char *start; start = os_strchr(event, '>'); if (start == NULL) return 1; start++; /* * ...
Deactivate wpa_cli notifications
1,461,595,270,000
I just wanted to try out how to connect to my WIFI WPA2 via terminal. Therefore I created "/etc/wpa_supplicant" network = { ssid = "nameOfWifi" psk = "passwordNumberThatIFoundOnTheWifiHardware" } Then I started following command sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf -D nl89211 No Errors th...
You need to use wpa_passphrase when creating a configuration file for a WPA network. wpa_passphrase is included with the wpa_supplicant package. Example: wpa_passphrase "nameOfWifi" "password" > /etc/wpa_supplicant.conf
dhclient connecting to wlan0 after wpa-supplicant setup polls infinitely
1,461,595,270,000
If we have a CentOS 7 desktop and a big wordlist and a WPA out.ivs capture (--ivs with airodump-ng), how can we use hashcat (without installing it via the package manager) to use the wordlist to "attack" the .ivs capture file to guess the password?
Convert the ivs file to hccap: aircrack-ng out.ivs -J out.hccap and then: hashcat --words-skip=0 --hash-type=2500 --outfile=cracked.txt --threads=4 out.hccap WORDLIST.txt I tried the latest aircrack-ng and hashcat on a T450 with an Ubuntu 15 LiveCD. aircrack-ng did ~1700 pw/sec, hashcat did ~1600-1650 pw/sec. Both...
How to use hashcat on CentOS 7 to crack WPA with wordlist?
1,461,595,270,000
When running: airodump-ng --ivs --channel 1 --write output --bssid VV:II:CC:TT:II:MM mon0 Question: When do I know I captured the WPA 4 way handshake?
airodump-ng puts the phrase "WPA handshake:" in the upper right hand of the terminal window when it has captured the handshake. See this tutorial for confirmation.
When do I know I captured the WPA 4 way handshake?
1,461,595,270,000
I'm trying to set up a connection to a WPA2-Personal network on a barebones Debian install. I've installed the firmware for my wireless adapter just fine (ipw2200) and can connect to open wireless networks perfectly. I've run through Debian's WiFi/HowToUse documentation a few times now, and each time it doesn't work. ...
Answering my own question to close; it seems the issue is on the network's end and not mine, I've since been able to connect to other WPA2 networks just fine.
Cannot connect to WPA2, but connecting to WEP is fine
1,461,595,270,000
[root@notebook /opt/aircrack-ng] dmesg -C [root@notebook /opt/aircrack-ng] aireplay-ng --test wlan0 ioctl(SIOCSIWMODE) failed: Device or resource busy ARP linktype is set to 1 (Ethernet) - expected ARPHRD_IEEE80211, ARPHRD_IEEE80211_FULL or ARPHRD_IEEE80211_PRISM instead. Make sure RFMON is enabled: run 'airmon-ng s...
The solution is based on two parts: 1 - you have to have a wireless card that supports packet injection. Mine wasn't good, so I bough a TL-WN722N*. 2- The channel needs to be set when starting in monitor mode (even with the TL-WN722N): airmon-ng start wlan0 1 *-> additional info: The TL-WN722N that works uses ath9...
Why doesn't WPA handshake occur?
1,537,709,960,000
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...
I don’t think systemd socket activation is significantly better than xinetd activation, when considered in isolation; the latter is stable too and has been around for longer. Socket activation is really interesting for service decoupling: it allows services to be started in parallel, even if they need to communicate, ...
systemd "socket activation" vs xinetd
1,537,709,960,000
I have a CentOS 7 system which uses systemd, and I want to start a tftp server. I'm confused about the right way to do this. I've seen some posts that say install xinetd and launch it from there (like pre-systemd), and other posts that say enable tftp.socket Is xinetd just a bridge to systemctl socket which will eve...
No, is not a bridge to systemctl, it's just the traditional daemon. So you can choose whether you start tftp with xinetd or with systemd socket. Nice explanation on systemd blog: http://0pointer.de/blog/projects/inetd.html.
systemd vs xinetd
1,537,709,960,000
I need to keep track of all SSH connections on my server. In my /etc/hosts.allow I have something like this: sshd: ALL : spawn ( echo "`date` from %u %a " >> /var/log/ssh/%d.log ) & where %a logs the client IP, and %u is supposed to log the username. But instead %u just logs unknown. Is there a way to fix this? I nee...
The %u client user name is only known if the client side machine is running identd and provides the username on request. tcp wrappers i.e. tcpd does the identd lookup and returns "unknown" if it doesn't get an answer from the client machine. Running identd used to be common practice back in the 90s, but is extremely...
hosts.allow: %u not working (log username)
1,537,709,960,000
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...
The xinetd daemon essentially listens for requests and then launches given service for it. Wikipedia entry for xinetd. From the OP's question, one can see /etc/xindet.d/daytime-stream, which means that xinetd is installed, along with the daytime service. However, as it is generally recommended for daytime to not be en...
How do I launch the daytime service?
1,537,709,960,000
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/tc...
The /etc/services does not indicate what services are actually running. See purpose of /etc/services. You will need to find a service that is running (or start one). You can see what is listening by looking at netstat -nlt. The particular services will vary, but you will see something like: $ netstat -nlt Active Inter...
What services accept tcp connection?
1,537,709,960,000
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_fai...
Do not do it this way, run lighttpd strictly as a daemon. The daemon xinetd is mean to start services that are not actually running all the time. When xinetd sees traffic it "spins up" a particular service to meet the need, but otherwise the processes are not running. By the way, you cannot share a TCP port between 2 ...
xinetd cannot launch lighttpd
1,537,709,960,000
I need to run approx, a package proxy for Debian / Ubuntu packages, on an OpenSuSE box. Until now, I converted the installation package from .deb to .rpm using alien. Installing the resulting .rpm gave me the approx binary in /usr/sbin/approx. Under Debian, approx is started using inetd. OpenSuSE seems to prefer xine...
Thanks to Nikhil's input, I got this solved. YaST only uses service names, not port numbers, when setting up xinetd. Unfortunately, for some historic reasons, approx defaults to port 9999. This is registered to another service, named "distinct". So, the ad-hoc solution was to rename port 9999's service to "approx" in...
Configuring OpenSuSE's xinetd
1,537,709,960,000
When I need to use SNMP monitoring for java applications, there is the need to that application (usually ran as daemon user) to listen on snmp port. If there is no other alternative, of course I can use another port, say 11161. But I can use XInetd to redirect port 161 to 11161. My question is: is this the best method...
First of all - the Oracle-description sucks. The proper way to use SNMP for an application (java is a application with regards to the operating system) is to register it as sub-agent to the OS-snmp-service (in case of linux: snmpd). There has to be a way to accomplish that. Afterwards you can use the SNMPD-security se...
Is xinetd still the best method to let non root daemons listen on privileged ports?
1,537,709,960,000
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 auth...
I'm assuming you already know about all the risks involved in running rshd, so I'll skip the "dire warnings" section of my talk. :-) If your distribution includes the program that you're running, there's a strong chance that it already has the correct systemd files to migrate to (/usr/lib/systemd/system is where the d...
Centos7: Starting xinetd service with systemd
1,537,709,960,000
I'm studying for the first LPIC exam. In a quiz, I've found this question: How can you tell whether your system is using inetd or xinetd as a super server? And the right answer should be: Type ps ax | grep inetd, and examine the output for signs of inetd (or xinetd). In my desktop (Fedora 21), this is the output o...
It's almost certainly xinetd since regular inetd is older than dirt but you can check the RPM database: [root@xxx01 ~]# rpm -qa xinetd xinetd-2.3.14-39.el6_4.x86_64 [root@xxx01 ~]# rpm -qa inetd [root@xxx01 ~]# For your commands you can probably just start the xinetd service to get the commands to work (since one isn...
Inetd and Xinetd: which is running?
1,537,709,960,000
I'm using GNU's Inetutils FTP and have gotten it all set up except it does not automatically start when I turn on my system. In order to get it to work I have to start the standalone using "ftpd -D". I've figured out that I have xinetd running and I believe I need to use that to automatically start the daemon. In the ...
I figured it out. Incase anyone else has this problem in the future, I forgot to specify a port to use for the service, changed the service name to ftp and set disable to no. Here is my final service file: service ftp { port = 21 disable = no socket_type = stream protocol = tcp wait = no user =...
Starting FTP with xinetd
1,537,709,960,000
Webmin is serving static help pages. Webmin 1.47 was using the characters set was iso-8859-1 as character encoding. This information is transmitted by the HTTP header content type:"Text/html; Charset=iso-8859-1" After migration to a newer configuration using Webmin 1.81, the content type header is now utf-8 instead...
Since it's HTML, you should be able to use meta http-equiv or meta charset to override, by putting on of these in the document's header: <meta http-equiv="content-type" content="text/html; charset=iso-8859-1"> <!-- or --> <meta charset="iso-8859-1"> You could also check if it's actually served by Apache (or similar);...
Webmin help page encoding : iso-8859-1 vs utf-8
1,537,709,960,000
I have have installed xinetd, and I wrote a script: #!/bin/bash echo "Some text" touch /home/somefile I made a service configuration under /etc/xinetd.d/ and basically it works when I connect to localhost under the configured port, because: The file somefile gets generated by the touch command on connection to the se...
Changing wait to no will likely solve your problem. From the man page: If its value is yes, the service is single-threaded; this means that xinetd will start the server and then it will stop handling requests for the service until the server dies and that the server software will accept the connection. The key bit ...
Telnet no echo output from xinetd script
1,537,709,960,000
I am trying to troubleshoot tftp on my Fedora 22 to see if it is working or not. All I want to do is transfer a file between two systems. The commands I am finding online are not working. All I need is the command and the directory where the files will go on both ends. I get a connection established to the tftp but wh...
You tftp server setting can be viewed in /etc/xinetd.d/tftp. server_args = -s /tftproot # tftproot is where your tftp base directory. Say you tftp server is hostx From hosty, try this command tftp hostx > tftp get file # file is any file under this /tftproot directory. > tftp quit ls -l file
Using TFTP on Fedora 22
1,537,709,960,000
Environment: CentOS 6.6 When running this simple test (from myclient): while true; do rsh myserver "echo OK"; done After ~500 iterations, the server runs out of ports. netstat -anp on the server shows: tcp 0 0 myserver:1008 myclient:922 TIME_WAIT - tcp 0 0 myserver:...
Hit this before in my life... the TIME_WAIT is an artifact of TCP/IP so you are stuck with it. It can be tweaked via /proc (see serverfault 23385) but a better way would be a solution that opened a persistent socket that works as long as needed. generate_lots_of_lines | ssh myhost 'while read line; do echo ":$line"...
RSH closing stderr socket with a delay?
1,537,709,960,000
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, ignorin...
echo is an internal shell command. If you change the first line to: #!/bin/bash The program will work because echo from bash understands -en. Otherwise, you have to see which shell is actually /bin/sh in your system and use the proper syntax for its echo command.
xinetd + shell script echoing flags in TCP packet
1,537,709,960,000
We are running several centos 6.4 lamp stacks, and our backup solution (unitrends) has a client that requires xinetd. Can these two coexist on the same server? If so, is there any secret handshake I need to perform to keep xinetd from assuming the work of Apache? Or am I worrying about nothing?
Xinetd and standalone servers can coexist without problems. Just check /etc/xinetd.d/ for the servers that are under xinetd and set to "enabled=no" the servers you want to keep standalone.
Running xinetd and httpd on centos 6
1,364,611,182,000
I'm using this for creating backups securely (? - is it really secure? with a good password?): # ENCRYPT ORIGDIR="DIRECTORYNAMEHERE"; tar cvf - "${ORIGDIR}/" 2>/dev/null | gzip -9 - 2>/dev/null | openssl aes-256-cbc -salt -out "${ORIGDIR}.tar.gz.aes" # DECRYPT openssl aes-256-cbc -d -salt -in "ENCDIRECTORYNAMEHERE" ...
Is there a reason you want to use 7z specifically, or do you just want better compression than gzip? The xz utility uses the same compression algorithm as 7z (LZMA), and allows piped compression the same as gzip. tar cvf ... | xz -9 | openssl ...
How to use 7z to compress via pipe?
1,364,611,182,000
At best I would like to have a call like this: $searchtool /path/to/search/ -contained-file-name "*vacation*jpg" ... so that this tool does a recursive scan of the given path takes all files with supported archive formats which should at least be the "most common" like zip, rar, 7z, tar.bz, tar.gz ... and scan the f...
(Adapted from How do I recursively grep through compressed archives?) Install AVFS, a filesystem that provides transparent access inside archives. First run this command once to set up a view of your machine's filesystem in which you can access archives as if they were directories: mountavfs After this, if /path/to/a...
Find recursively all archive files of diverse archive formats and search them for file name patterns
1,364,611,182,000
I run Linux Live CD and I need to extract a specific file from a wim-archive that is located on a disk drive. I know a full path to the file in the archive: xubuntu@xubuntu:~$ 7z l winRE.wim | grep -i bootrec.exe 2009-08-28 15:02:29 ....A 299008 134388 Windows/System32/BootRec.exe I am short on disk spac...
The man 7z page says: -i[r[-|0]]{@listfile|!wildcard} Include filenames You need to explicitly specify ! before the file name and protect the switch from bash expansion with single quotes: 7z x '-i!Windows/System32/BootRec.exe' winRE.wim xubuntu@xubuntu:~$ 7z x '-i!Windows/System32/BootRec.exe' winRE.wim...
Extracting a specific file from an archive using 7-Zip
1,364,611,182,000
Doing 7z x on an archive gives me '20 ª.1 ¯® '$'\302\212''¨à®¢®£à ¤áª ï ã«.rtf' IMG_6527.JPG ''$'\302\212''¨à®¢®£à ¤áª ï, ¨áâ.doc' IMG_6532.JPG ''$'\302\204''®¯ ᮣ« è¥­¨¥(3).doc' IMG_6542.JPG ''$'\302\204\302\212\302\217''.doc' IMG_6543.JPG IMG_6526.JPG Clearly some files were encoded dif...
Depending on the encoding used to create the zip file, you might be able to prevent unwanted translations by temporarily setting the locale to "C": LC_ALL=C 7z x $archive (This helped for a zip created by IZArc on Win7, using two of your example filenames.) However, for the archive in the question, the "filename" fie...
How to specify character encoding for 7z?
1,364,611,182,000
Because of specifics of my archiving needs I am not comfortable with solid tar.gz archives and use 7z instead. I use the following command to do this: 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off ~/my/folder.7z ~/my/folder/* To create an archive of everything inside ~/my/folder/ as the ~/my/folder.7z file. But ~/...
If you want the contents of a single directory, an easy method is to change to it first: cd ~/my/folder 7z a -t7z -m0=lzma -mx=9 -mfb=64 -md=32m -ms=off ~/my/folder.7z . What you saw is that * expands to the list of names of files that don't begin with a .. That's the documented behavior, and it's the main reason why...
How to use 7z to archive all the files and directories (including hidden ones) in a directory?
1,364,611,182,000
I have a .7z file which I need to extract the contents of. The problem is, that it's password protected and currently, I have to SSH into the server and enter the password. I would like to this without the need of this. Is this possible? I have tried: 7za x file.7z -ppassword pass But does not work, just returns "No...
This is a year+ late, but in case anyone else googles this, use: 7za x file.7z -p'your_password' Wrapping the password in single quotes does the trick
7za - Extract file with password
1,364,611,182,000
How can I safely and quickly repack a zip archive to a 7zip archive? I checked options of 7zip program but I don't see any option to repack. I know I can extract to directory and then pack this directory but is it safe? What if ZIP has paths like "../../file.exe" or "/etc/bin/file.exe"? I tried unpacking files to std...
You'll need to extract them to a temporary directory. According to unzip (1), For security reasons, unzip normally removes "parent dir" path components ("../") from the names of extracted file. This safety feature (new for version 5.50) prevents unzip from accidentally writing files to "sensitive" areas ...
How can I repack zip to 7zip?
1,364,611,182,000
I have a directory test with three files, ls -l test: total 8 -rw-r--r-- 1 mb mb 16 Jul 25 11:12 regular_file -rwxr-xr-x 1 mb mb 19 Jul 25 11:02 script.sh lrwxrwxrwx 1 mb mb 12 Jul 25 11:14 symlink -> regular_file It contains a regular file, a symbolic link, and an executable script. After archiving this directory wi...
This seems to be a limitation of 7-Zip, judging from these bug reports: #1302 .tar archives fail to extract properly #1188 symlinks in tar archives are extracted to 0 byte files For now, I'll keep using tar -xzf test.tgz to extract the files.
Preserve file permissions and symlinks in archive with 7-Zip
1,364,611,182,000
How can I check if a file is an archive and then extract it with 7z? I understand that I could check it by file command but it won't work in scripts because of its output. I can't predict what type of archive it could be. I just want to do something like: Can I extract it by 7z? If yes, extract, if not, go furth...
The 7z utility returns a non-zero exit code if the operation it performs fails. You can use this fact to try to extract the archive and then do something else if that fails: if ! 7z e filename 2>/dev/null; then # do something else fi or, depending on what else you want to do, or not do, if 7z e filename 2>/dev/nu...
Check if file is an archive; if yes, extract
1,364,611,182,000
I've been attempting to compress my mysqldump output via 7z using the pipe operator (I have seen this question, but its answer uses xz not 7z). This is what I have tried so far: mysqldump -u root -p Linux_Wiki | 7z > backup.sql.7z and: mysqldump -u root -p Linux_Wiki | 7za > backup.sql.7z and: mysqldump -u root -p ...
First store the password in a file called .my.cnf in the users home directory with the following format: [mysqldump] password=secret Then, you have to use mysqldump without the -p flag to dump a mysql database (it now uses the password from the file): mysqldump -u root database | 7z a -si backup.sql.7z The a flag ...
How to compress a mysql dump using 7z via a pipe?
1,364,611,182,000
When creating a 7zip archive with file-roller, there is a checkbox labeled "Encrypt the file list too". And it seems to work as you cannot see the file list when opening an archive created with this checkbox ticked until you enter the password (which you are immediately prompted for when opening the archive), whereas ...
From the manual page for 7z: -mhe=on|off 7z format only : enables or disables archive header encryption (Default : off)
Encrypt file list when creating 7zip archive on command line
1,364,611,182,000
As I don't use GUI for archive extraction much, I don't know since when this error I am getting: An error occurred while loading the archive. This error I get while trying to open an ordinary Zip and / or 7z archives, but I care only about Zip in this question. I am able to open tar.bz2 and tar.gz files, though. As...
I had to self-compile the p7zip package, now everything works as usual. I tried purging p7zip-full and installing it back, but that didn't do anything, I still wonder why. Nevermind, solution was to build the package myself, I should have done that long time ago.
file-roller: An error occurred while loading the archive (Zip/7z)
1,364,611,182,000
With the commands md5sum, sha1sum, sha256sum I can take a text file having an hash and a path per line and verify the entire list of files in a single command, like sha1sum -c mydir.txt. (Said text file is easy to produce with a loop in find or other.) Is there a way to do the same with a list of CRC/CRC32 hashes? Suc...
Try RHash Try RHash. There are packages for Cygwin, Debian. Example $ echo -n a > a.txt; echo -n b > b.txt; echo -n c > c.txt ✔ $ rhash --crc32 --simple *.txt > checksums.crc32 ✔ $ cat checksums.crc32 e8b7be43 a.txt 71beeff9 b.txt 06b9df6f c.txt ✔ $ rhash --crc32 --check checksums.crc32 --( Verifying checksums.c...
Command to verify CRC (CRC32) hashes recursively
1,364,611,182,000
The man page says 7z tool supports 7z, LZMA2, XZ, ZIP, Zip64, CAB, RAR, ARJ, GZIP, BZIP2, TAR, CPIO, RPM, ISO, most filesystem images and DEB formats. And it says we could pass the type as -t{Type}. The following command is success. 7z a -tzip archive.zip dir1 dir2 file1 file2 But I can't archive the files into .xz u...
Like gzip (.gz) and bzip2 (.bz2), but unlike zip and rar, xz is a compression format, not an archive format. You can compress one file: 7z a -txz foo.xz foo This is equivalent to xz foo. Typically, to make a compressed archive, you make a tar archive and compress it. You can make a compressed archive with 7z, but as ...
7z command to create a XZ file
1,364,611,182,000
I have about two hundred sub-directories located within a directory of interest: $ ls backup 201302 201607 201608 201609 201610 201701 201702 201705 201801 201802 I want to create a 7z archive xyz.7z for each directory xyz: cd $HOME/backup/ 7z a "storage/nas/TBL/compressed_backups/$xyz.7z" "$xyz" -mmt=4 So in the en...
Use the following approach: ls backup | parallel -j5 7z a -mmt=4 "storage/nas/TBL/compressed_backups/{}.7z" {} {} - input line. This replacement string will be replaced by a full line read from the input source.
Create separate 7z archives for each directory in the current directory and additionally parallelize through GNU Parallel
1,364,611,182,000
7zips context menu appears twice to me when I right-click to a file.. Same thing happens in both dolphin and krusader. It looks like this: I've found 7zips readme.txt in /usr/share/kde4/services/ServiceMenus/ and this is one of the things in it: 3) installing the context menu for KDE (dolphin or konqueror) (teste...
I had the same problem and your question actually helped me out a lot. I tried to delete the first one (p7zip_compress2) after I checked that inside the file it had the same entries as the rest of the .desktop files... So delete it and solved! no need to restart or anything
7zip context menu appears twice
1,364,611,182,000
I want to get the number of files (included directories) contained in the root of a 7z archive, but the 7z command on Linux don’t bring a simple way to only get the number and noting else. For example I have the 7zarchive.7z file witch contain archive.tar and archive.gzip. Then, 7z l 7zarchive.7z print me the followin...
I finally find it, it was more simple that I imagine: 7z l -slt <nameof archive> | grep -c 'Path = [^/]*$'.
How to get number of files in a 7z
1,364,611,182,000
As in title. I've got a lot of ZIP archives that I want to extract. All archives have their own unique name. All archives contain files only (inside archives there are NOT folder(s) at all: no parent / main folder). I'd like to process all these ZIP archives via GNU parallel. To sum up: archivename(s).zip has NOT fol...
Removing file extension when processing files: parallel 'mkdir {.} && cd {.} && unzip ../{}' ::: *.zip
GNU parallel + gunzip (or 7z, or bsdtar, or unzip): extract every "archivename.zip" into (to-be-created) its "archivename" subfolder
1,364,611,182,000
I'm trying to decompress a big zip file containing more that a hundred files, 128 MB each. When the decompression is interrupted, I have to delete the last file that was being decompressed, and restart all over with the option to skip existing files enabled, like so: unzip -n my_compressed_file.zip -d destination Is ...
You could write a wrapper script that extracts the files to a temporary location, and only moves them to their final destination when they are complete. Something like tempdir="incomplete/" mkdir -p "$tempdir" zipinfo -1 compressed.zip | while read f ; do test -f "$f" && continue # skip anything extracted by...
How to obtain only fully decompressed files in destination folder when decompressing zipped file?
1,364,611,182,000
I'm trying to make a bash script that takes a large number of 7z archives and combines them into one archive. Here's what I have so far. #!/bin/bash DUMPPATH="/home/backups/dumps/" NEWPATH=$DUMPPATH"combined/" FILETYPE="*.7z" DATE="$(date +%Y-%m-%d-%H-%M-%S)" NEWNAME=$NEWPATH"AllAsOf"$DATE".7z" for FILE in $(ls $DUMP...
I learned from this question that I can add the file name after the -si flag in 7z. I added a line to get the filename, also. My script became: #!/bin/bash DUMPPATH="/home/backups/dumps/" NEWPATH=$DUMPPATH"combined/" FILETYPE="*.7z" DATE="$(date +%Y-%m-%d-%H-%M-%S)" NEWNAME=$NEWPATH"AllAsOf"$DATE".7z" for FILE in $(...
How can I combine multiple 7z archives into one?
1,364,611,182,000
I accidentally typed 7z e archive.7z and all the files ended up in my home directory when I wanted to extract them in a subfolder. How can I clean the mess and remove all those files?
Looking at this answer and that one in particular, I ended up running this command which removed all the unwanted files: 7z l archive.zip | awk ' {print $6} ' | awk ' function basename(file) { sub(".*/", "", file) return file } {print basename($1)} ' | xargs rm -rf
How to undo and revert an accidental `7z e`
1,364,611,182,000
Using 7z, I'd like to print the names of the files inside an archive. The output of 7z l myArchive.7z is 7-Zip [64] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 p7zip Version 16.02 (locale=en_US.utf8,Utf16=on,HugeFiles=on,64 bits,4 CPUs Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz (206A7),ASM,AES-NI) Scanning...
Just use libarchive's bsdtar: bsdtar tf file.7z Also note that 7z l would prompt you for a password if the archive is encrypted while bsdtar will just return with an error which would be preferable in scripts.
How to get file names in archive with 7z
1,364,611,182,000
I am on Linux Mint 18 Cinnamon 64-bit. I have these binaries of 7z and their versions on my system: /usr/bin/7z 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 and /usr/local/share/PeaZip/res/7z/7z 7-Zip [32] 16.02 : Copyright (c) 1999-2016 Igor Pavlov : 2016-05-21 As I am always using the latter,...
A way of replacing a binary with another in Debian such that it survives updates on the packages (for instance, replacing the init file of a BIND package), is doing a file diversion. Basically a file diversion install/moves the original file to another location, and instructs the package manage system to place any su...
What is the proper way to use an alternative binary
1,364,611,182,000
Until now, I used to backup my data using tar with one of the LZMA compression options (--lzma, --xz or --lzip) I recently noticed that 7-Zip has been ported to Linux in 2021 (https://www.xda-developers.com/7-zip-linux-official-release/). I'm not talking about the older P7Zip (https://p7zip.sourceforge.net/), that doe...
7zz uses hand-written assembly, p7zip and xz do not. Besides, XZ's LZMA implementation is very dated. Igor Pavlov has made a ton of changes in 7-zip to speed it up in the last seven years.
Why is 7-zip much faster than other LZMA implementations in Linux?
1,364,611,182,000
I did quite a bit of searching before asking this! (Even so I'm expecting to have a duplicate pointed out). So I collect a bunch of files, e.g.: find . -name "2020-*" ... is there some way to "pipe" all these files into a .7z archive? (NB I realise "pipe" may not be the right word as the operation I want is in fact ...
You need to provide the file names as arguments to 7z: find . -name '2020-*' -exec 7z a -p pumple.7z {} + This tells find to look for files (of any type) whose name matches 2020-*, and when it finds such files, run 7z a -p pumple.7z followed by the names of the files. The {} is the placeholder for the file names, and...
Add files from "bash find" to 7z archive
1,444,231,093,000
How can I create a Wi-Fi hotspot with the command line tool nmcli and share/bridge the ethernet internet connection with the wireless access point? Furthermore, how can I start this automatically at boot? Is this possible with nmcli?
I created a Hotspot with the GNOME Network-Manager. The problem was, that I can not configure the SSID and password in GUI. If you create the Hotspot with the Network-Manager GUI, it creates the file /etc/NetworkManager/system-connections/Hotspot. In that file it is possible to edit the SSID and the password. sudo vim...
Create wireless access point and share internet connection with nmcli
1,444,231,093,000
As we know, We can create virtual wireless interface using iw dev (1). Also, We can change it's MAC address using ifconfig <ifname> hw ether <Address>. Then We can Set two different access points (SSIDs) to each of these inetrfaces using Network Manager. For example: (Real) wlan0: 00:16:b6:ab:cd:e7 -> AP(1) (Virt...
Some(Most in 2021?) Wifi-chips can function in several modes at the same time, but all on the same frequency, because they use the same radio. Now, If you have 2 radios attached to your chip, you could have several functions on several frequencies/channels. Update 2021: Some cards can work on 2 Channels at the same ti...
Single wifi card, Connect to multiple access points simultaneously
1,444,231,093,000
(I was trying and trying for hours to find a workaround, which proved much harder than initially expected.) The problem itself is easy to understand, though. I recently installed a GUI-less Debian derivative on one of my machines and configured /etc/wpa_supplicant/wpa_supplicant.conf to access one of my access points ...
To debug what wpa_supplicant is doing, wpa_cli status will give information about whether wpa_supplicant still thinks it's connected to an AP, or searching for a new AP. Wpa_supplicant needs to be in roaming mode to automatically switch between networks. You enable roaming by using a wpa-roam entry after the iface sta...
wpa_supplicant doesn't auto-change AP
1,444,231,093,000
I'm currently trying to set up an access point on my raspberry pi, but as soon as I install 'dnsmasq', the internet connection is lost ('unknown host' when trying to ping any server). What causes this and how do I connect it to the internet again? P.S.: i can access it via ssh, so local network is still working... edi...
You need to configure dnsmasq. Look in /etc/dnsmasq.conf. I don't know much about your situation, but I'm certain that you'll need to set these options: resolv-file=/etc/dnsmasq.resolv listen-address=127.0.0.1 listen-address=10.0.0.3 # Or whatever the machine's IP address is. The file /etc/resolv.conf is what every...
Internet connection lost after installing dnsmasq
1,444,231,093,000
I have this network adapter in an Asus notebook running Manjaro Linux (based on Arch), everything up to date (Kernel: 3.10.11): > lspci -k | grep -A 3 -i "network" lspci: Unable to load libkmod resources: error -12 07:00.0 Ethernet controller: Qualcomm Atheros AR242x / AR542x Wireless Network Adapter (PCI-Express) (re...
Just found the answer myself (after googling hours to find the answer in a small but very important sentence in a private blog post about Ubuntu): Disable (means stop the daemon or kill the process) networkmanager (or in some Distros network-manager) because it does take control over the (W)LAN Adapters, blocking it f...
hostapd, ath5k, nl80211 - how to get it working?
1,444,231,093,000
I am trying to set up an AP using the following configuration: Wi-Fi adapter: TP-Link AX3000 (Intel AX200 based) Operating system: Ubuntu Server 20.10 (groovy) Kernel version: 5.8.0-44-generic Firmware: iwlwifi-cc-a0-55.ucode AP service: hostapd v2.9 (tried the custom-build from the latest source code as well) I hav...
To my surprise, the solution was installing the network-manager package. No additional configuration was required, not even setting the wireless interface as managed by NetworkManager. I replicated the same behaviour on another system (Raspberry Pi CM4 board with Ubuntu Server 20.04). Just a note, Ubuntu Server comes ...
Why can't hostapd service start AP configured in the 5 GHz band using Intel AX200 based adapter?
1,444,231,093,000
I have a nice little iMX6 (an ARM CPU) board running Linux kernel 3.0.35 with hostapd 0.7.3. Setting up the wireless interface as an access point works fine but clients think they can be routed through it to the Internet. This would not be a problem except that I want to set up one client (my laptop) with its wired/Et...
Your problem is so obvious that you're going to knock yourself on the head once you see it: stop advertising a router -- get rid of your "option routers" line in your dhcpd.conf. If you do have a subnet behind your AP, you can have dhcpd push static routes with "option static-routes", IIRC. But you don't need a rout...
How do I prevent my hostapd access point from pretending to route to the Internet?
1,444,231,093,000
In the documentation of Debian it is written that: Just like you can bridge two wired ethernet interfaces, you can bridge between an ethernet interface and a wireless interface. However, most Access Points (APs) will reject frames that have a source address that didn’t authenticate with the AP. Since Linux does ether...
The problem is that wireless frames in the regular mode only have space for three MAC addresses. The details are a bit more complex, but roughly speaking, there's one MAC address for the external interface of the "distribution system", as it is called in the standard (the collection of access points), one for the acce...
Why can't we easily bridge over a wireless NIC
1,444,231,093,000
I have ubuntu 14.04 installed on a computer with a built-in wifi and also a usb wifi. I want to run hostapd on built-in wifi to act as an access point though no connection will be established with it. I only need it to read signal levels from another device. when I enter the following on terminal I am able to see the...
After the commands above, restarting the hostapd did the trick. sudo service hostapd restart Now the internal wifi works as an access point and the usb dongle is connected to another access point providing internet connection.
"nmcli nm wifi on" stops hostapd
1,444,231,093,000
I'm trying to set up my Raspberry Pi Compute Module 3+ as an access point with an access point with a WiFi dongle. I'm following this tutorial : https://elinux.org/RPI-Wireless-Hotspot. I can set up the access point with the dongle EP-N8508GS, but when I try with the TL-WN722N, I have this error: pi@raspberrypi:~ $ su...
It seems that you need a driver for tp-link USB dongle soft-AP. I resolve this problem by installing this driver. You can find it : here
Hostapd doesn't work for one of my device
1,444,231,093,000
Let me refer responders to this thread on Linux Mint forums: Chrome/Firefox not loading Google websites I've seen this four times in the past two weeks or so. The loss of connection does eventually clear after an unknown time (longest has been 4 days). In a nut shell, almost all URL-s work but key ones you'd need t...
(update: 2015-12-16) These last few days I had occasion to use-up the remaining MB-s on the USB modem. I have had exactly zero DNS issues. At one point I lent the USB wireless broadband modem to someone; and used the micro-USB via a mobile phone (same network provider). DNS issues returned in very short shrift! Th...
How can I (re-)connect DNS for gmail on Linux Mint?
1,444,231,093,000
I am setting up a local survey system. The linux laptop will run limesurvey (on a typical LAMP stack) and will be accessible by 5 tablets given out to conference participants. Tablets are no problem as they would be pre-configured with survey loaded. I would like however to allow the conference participants to access ...
Sure! Redirect all name resolutions to one address with the command: address=/#/10.0.0.101 That is the entry required in the /etc/dnsmasq.conf file. Which I recommend using as that will enforce such configuration if the server is reboot for any reason. On the command line, the option is called: -A, --address=/<domain...
Can I get dnsmasq to drop/reject/redirect any address queries except one?
1,444,231,093,000
I'm looking for a simple way to configure an external Access Point (IP address, SSID, WPA key, turn WiFi on/off, etc.) via Linux command line instead of the standard web interface that APs offer. This could be either an off-the-shelf AP that offers this feature, or a procedure to accomplish this with any standard APs...
You'll (almost certainly) need to flash a custom firmware on the AP to enable this functionality. The two most common firmwares to use for this are OpenWRT and DD-WRT. They're very similar but have slightly different hardware compatibility lists. If you already have the AP check to see if one of them support it. I...
Access Point configurable via Linux [duplicate]
1,444,231,093,000
I would like to switch which AP an iot device is connected to based on some external logic. My AP switching script looked like this: function switch_ap() { current_connection=$(nmcli conn show --active | tail -n 1 | cut -d' ' -f1) nmcli conn down $current_connection if test "$current_connection" = "home_ap"; th...
Network manager is made to mange networks, it has logic to switch networks based on availability. when you run the first script and take it down, the network manager daemon probably notices and connects to whatever is the default that’s available. The second one you’re moving the files that tell network manager which ...
NetworkManager is failing to switch AP: Connection Activation Failed
1,444,231,093,000
I'm trying to setup a raspberrypi 4 as a wifi access point. Following the official documentation I managed to bridge my eth0 interface and setup hostapd. The bridges IP is provided by an exisiting DHCP server on the network in contrast to the documentation. The problem I'm facing is that none of the connected wifi dev...
A.B's comment is actually right. My raspi and the current raspbian on it do load the br_netfilter module. Upon removing it and after restarting hostapd all my clients do now get valid IPv4 adresses. Inserting the module breaks the functionality again. Thank you A.B!
hostapd clients don't get ipv4 addresses
1,444,231,093,000
Background: I am trying to set up an access point on Linux. The ultimate aim is to run SSLStrip (for an exercise) so I need to be able to do something like this, to redirect port 80 traffic through port 10000, on which SSLStrip listens. iptables -t nat -A PREROUTING -p tcp --destination-port 80 -j REDIRECT --to-port...
Turns out it was network-manager interfering. Switched it off service network-manager stop and everything works fine. I suspect there exists a less drastic solution than disabling it altogether, but it does what I need for now.
Linux access point (airmon-ng/airmon-ng) not working
1,307,090,858,000
How can I restrict a user on the SSH server to allow them only the privileges for SSH TUNNELING? i.e. So they cannot run commands even if they log in via SSH. My Linux servers are Ubuntu 11.04 and OpenWrt.
On the server side, you can restrict this by setting their user shell to /bin/true. This will allow them to authenticate, but not actually run anything since they don't get a shell to run it in. This means they will be limited to whatever subset of things SSH is able to offer them. If it offers port forwarding, they w...
How to restrict an SSH user to only allow SSH-tunneling?
1,307,090,858,000
How do I completely disable an account? passwd -l will not allow anyone to log into an account using a password but you can still log in via private/public keys. How would I disable the account completely? As a quickfix I renamed the file to authorized_keys_lockme. Is there another way?
The correct way according to usermod(8) is: usermod --lock --expiredate 1970-01-02 <username> (Actually, the argument to --expiredate can be any date before the current date in the format YYYY-MM-DD.) Explanation: --lock locks the user's password. However, login by other methods (e.g. public key) is still possible....
How do I completely disable an account?
1,307,090,858,000
I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user. I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish it?
Method 1: Changing the user's home directory Make sure the following line exists chroot_local_user=YES Set user HOME Directory to /var/www/ , if you want to change for existing user then you can use: usermod --home /var/www/ username then set required permission on /var/www/ Method 2: Use user_sub_token If you don't...
Limit FTP access only to the /var/www with vsftpd
1,307,090,858,000
I'm allowing a friend a local account on my machine, exclusively for SCP. Can I specify his account's shell as /bin/true, or in any other way limit the account, while still allowing SCP?
I recommend using rsync instead of scp. For users, it has many more useful features. On the server side, it comes with rrsync to allow synvc access inside a given directory, but no general shell access and no access to other directories. Alternatively, you can restrict the account to only allow SFTP and not shell acce...
Do you need a shell for SCP?
1,307,090,858,000
How to block command, let say mkdir for specific user ? What I did just created read-only function and store in users profile ~/.bashrc /bin/mkdir() { echo "mkdir command not allow for you" } mkdir() { echo "mkdir command not allow for you" } ./mkdir() { echo "mkdir command not allow for y...
I don't know how to do it with bash, but I know of another shell that restricts the user environment: lshell (limited shell). A quick overview of configuration Lshell is configured via an INI file. By default, it holds a whitelist of allowed commands, but it can be easily configured to prohibit user from using a speci...
Block Particular Command in Linux for Specific user
1,307,090,858,000
If a user has loginShell=/sbin/nologin is it still possible to ssh user@machine [command] assuming that the user has proper ssh keys in its home directory that can be used to authenticate? My goal is to keep the user as a nologin, but still able to execute commands on a few other machines on the network (similar to ...
Setting /sbin/nologin as the user's shell (or /bin/false or /bin/true, which are almost equivalent) forbids the user from logging in to run any command whatsoever. SSH always invokes the user's login shell to run commands, so you need to set the login shell to one that is able to run some commands. There are several r...
Can a command be executed over ssh with a nologin user?
1,307,090,858,000
I'm running a server, and I need to give read/write access to a particular directory to a single user. I've tried the following: sudo adduser abcd sudo groupadd abcdefg chown -R .abcdefg /var/www/allowfolder chmod -R g+rw /var/www/allowfolder usermod -a -G comments abcd The above seems to work, however it gives the u...
Negative ACLs You can prevent a user from accessing certain parts of the filesystem by setting access control lists. For example, to ensure that the user abcd cannot access any file under /home: setfacl -m user:abcd:0 /home This approach is simple, but you must remember to block access to everything that you don't wa...
Give user read/write access to only one directory
1,307,090,858,000
This is what I'd like to be able to do: After a user's account is created, they should be able to ssh-tunnel, but their account is automatically removed after 30 days unless the countdown is reset by the root user. How can I automate this? I'll have to handle around 15 users.
useradd You can control how long a user's account is valid through the use of the --expiredate option to useradd. excerpt from useradd man page -e, --expiredate EXPIRE_DATE The date on which the user account will be disabled. The date is specified in the format YYYY-MM-DD. If not specified, useradd wi...
How can I create automatically expiring user accounts?
1,307,090,858,000
How to add an ssh user who only has permissions to access specific folder? useradd -d /var/www/xyz.com.tr/musteri -s /bin/bash -g sshd musteri I created a user called musteri. I set its home folder and group. So, I want to integrate musteri users into "/var/www/xyz.com.tr/musteri". I don't want it to access another ...
It sounds like you want your müşteriler to have file transfer access to a folder without actually giving them shells. This is a good thing because as binfalse pointed out, giving people shells with limited access is tricky because shells need to access all kinds of things scattered on the system just to run. In order ...
How to add a ssh user who only has permissions to access specific folder?