Skip to main content

Posts

Showing posts from January, 2015

How to reset password in single user mode in Mac OS X

To change the user password in Leopard(10.5.x) or SnowLeopard (10.6.x) Hold "Command + S" key on your mac keyboard to boot your mac into single user mode. Execute command "mount -uw /" in shell. Run below command " launchctl load /System/Library/LaunchDaemons/com.apple.DirectoryServices.plist" Execute command :  passwd change the password of root.

How to find a specific file belongs to which RPM or DPKG package on linux systems.

         On Linux systems ( RPM or Debian), We would often require to find out to which package the target file belongs on the system. This can be found by using following set of commands on the system. On RPM based systems :           When we execute the rpm -qf command to find out which package the file belongs ( as shown in the example below) rpm -qf /etc/protocols   setup-2.8.14-20.el6_4.1.noarch The /etc/protocols file belongs to package "setup-2.8.14-20.el6_4.1.noarch" on SLES 11 Sp3. On Debian based systems :          When we execute the dpkg -S  command to find out which package the file belongs ( as shown in the example below) #dpkg -S /etc/protocols netbase: /etc/protocols The /etc/protocols file belongs to package "netbase"  in ubuntu 14.04/ We can also use the below method to find the about the package information the file belongs on ubuntu (debian) systems. apt-file sea