Archive for March, 2010

Linux How to: Add a existing user to existing group

usermod example

Add existing user john to admin supplementary/secondary group with usermod command using -a option ~ i.e. add the user to the supplemental group(s). Use only with -G option:

# usermod -a -G admin john

Change existing user john primary group to mail:

# usermod -g mail tony

Related posts:

  1. Migrate existing Ext3 filesystems to Ext4
  2. Rethinking the GUI (Graphical User Interface) and the CLI (Command Line Interface)
  3. Run Single Commands on a SSH-based Server
  4. Howto Recover a Linux Root Password
  5. Linux Gets Automatic Tuning
  6. Howto: How to Reset the MySQL Root Password
  7. Microsoft is using Linux
  8. Linux Audio Editor Top 3
  9. How to mount bin / cue image files in Linux
  10. VMware Killer: Xen With Graphical User Interface On A Fedora 7 Desktop

Comments

Howto Recover a Linux Root Password

This post is intended for users that forgot the root passwords or can’t use it due to other problems (corrupted file /etc/passwd or whatever). Can also be used to gain unauthorized to linux machines, but don’t do that.

What to do
Boot using a recovery CD or DVD.

Mount the drive

mount /mnt /dev/sda2

Replace the existing root password with an empty one

sed /^root/s/.*:root:/root::0:0:root:/ /mnt/etc/passwd

And reboot – and you are done ;-)

Related posts:

  1. Howto: How to Reset the MySQL Root Password
  2. Recover (Crack) a password from a Microsoft Access Database (mdb)
  3. Crack or Recover Password Protected Excel Spreadsheet
  4. How to hack Windows password with Ophcrack
  5. Crack or Recover Read-only Password Protected Word Document
  6. HackerGuide: Crack Password Encrypted Zip-files
  7. Howto Create a libstdc++ Compat on Debian (e.g. libstdc++-libc6.2-2.so.3)
  8. Ubuntu Howto: Install Xen
  9. Crack zip password with fcrackzip
  10. Password Manager – based on gnupg

Comments

Combine Multiple PDFs Into One File

From time to time it is very useful to combine multiple PDF documents into one file.

Install gs (ghostscript) and pdftk (tool for manipulating PDF documents)

sudo aptitude install gs pdftk

Now we will see one example, which shows how to combine a few pdf files; 1.pdf,2.pdf,3.pdf.

gs -dNOPAUSE -sDEVICE=pdfwrite -sOUTPUTFILE=combined_pdf.pdf -dBATCH 1.pdf 2.pdf 3.pdf

If you want to know more options available for gs command check the gs man page

Related posts:

  1. dos2unix on Ubuntu and Debian
  2. Crack pdf password with pdfcrack
  3. Bash shortcuts tips and tricks
  4. Upgrading to Ubuntu 9.04
  5. Track file downloads and outgoing links with Google Analytics
  6. How to mount bin / cue image files in Linux
  7. Executing SQL Statements from a Text File
  8. HackerGuide: Crack Password Encrypted Zip-files
  9. HackerGuide: Syn-Flood Attack
  10. Howto Install Oracle on Debian

Comments