Christian Lehnert — Linux, Hacking & Faith

tag: #tip-of-the-week

7 posts
3 weeks ago adduser vs useradd - The Debian Trap

On Debian and Ubuntu, two commands look like they do the same thing. They do not. adduser is a Perl wrapper from the adduser package. useradd is the raw binary from upstream shadow-utils. The difference catches operators who write portable scripts and expect either name to work the same way on RHEL or Alpine.

#linux #debian #ubuntu #tip-of-the-week
1 month ago Recovering Deleted Binaries from /proc

A binary deleted from disk while the process is still running is not actually gone. The kernel keeps the inode alive as long as the process holds it, and /proc/PID/exe is a real readable handle to it. You can copy a running program out of /proc and reconstruct it on disk byte for byte.

#tip-of-the-week #linux #bash #shell