I was just wondering, is it possible to export the raw text password into a file using echo “$password” >> /home/user/Desktop/file name. I know that the password is validated against the shadow file by pam_unix.so. Can the username and password exported before the raw text is being converted? Answer Of course you can substitute the login(1) command with one of
Tag: linux-kernel
Playing with shmat and shm_open
I just read the manpages for shm_open and shmat and was trying out the following example. In a file test.c I do, And in a wrapper file I do, I tried adding in a strerror(errno) at test.c and I get Identifier removed. What does that mean? What am I doing wrong? Given a shared memory identifier(shmid), shouldn’t I be able
What’s the CONFIG_OF in linux?
I see that it is being widely used at many places but could not understand in what scenarios I need to use it. What is CONFIG_OF? What is the full name of “OF”? Answer Open Firmware. This was invented long time ago when Apple was producing laptops based on PowerPC CPUs and Sun Microsystems workstations were still popular. Open Firmware
pci device info access in linux from userspace
I want to access the pci device tree information from user space programatically. Like the root complex and the devices connected to it. How can I do it please let me know. Regards, Pradeep Answer libpci or pcilib (on which lspci is based) uses sysfs, procfs, and possibly other means to access PCI information. You can check pciutils package source
__builtin_return_address returns null for index >0?
I want to get the return address of the caller function. I’m using __builtin_return_address() funtion, but if I give index value greater than 0 it is returning NULL. Please help me with this or tell me any other function to get the same. Answer See this answer to a related question. __builtin_return_address is GCC and processor specific (also available in
Difference between spi_driver.id_table and spi_driver.driver.of_match_table
I’m currently trying to understand how linux drivers work. As far as I know, A driver’s probe/init function is called when the kernel parses the corresponding .compatible string in the device tree. However, in the arizona-spi driver it looks like there are multiple compatible strings referenced in different members: This is an excerpt from here. So what is the difference
kvm: module verification failed: signature and/or required key missing – tainting kernel
I’m using Ubuntu 14.04 LTS and kernel version 3.13.11.4. I’m trying to load patched KVM modules kvm and kvm-intel and I’m getting the following errors kvm: module verification failed: signature and/or required key missing – tainting kernel and kvm: module has bad taint, not creating trace events. The source used is the same source that created the image that I
How can i drop packet in kernel after catched it by sock_raw in usermode?
I have use sock_raw get all ip packet from kernel. But packet still alive in kernel, how can i drop it? Answer You cannot. When you receive the packet on a raw socket, the kernel has created a copy and delivered it to your receiving process. The packet will continue being processed in the meantime according to the usual semantics.
how to find Linux module path
in the linux, lsmod lists a lot of modules. but how can we find where those module loaded from. for some modules,linux command “modprobe -l” shows a path but some are not. edited i also tried “find” and “locate”. both of them lists all kind of versions Answer You can use “locate” or “find” command on these modules to find
What’s the difference between insmod and modprobe?
I know insmod and modprobe are used to insert module into the kernel. But, what’s the difference between them? And, why is it dangerous to insert modules with force option in modprobe? Answer modprobe is the intelligent version of insmod. insmod simply adds a module where modprobe looks for any dependency (if that particular module is dependent on any other