Backups my friend. That's why we have them. There's no way working with computers every day, that you won't screw up now and then, even if you're careful.
If you know _exactly_ what you did, and what was lost, it means you can restore just those parts. Ie. if it's just the partition table that got wiped, you can just restore that and be fine. If you also wiped file system details, boot information etc. you'll have to restore those bits too.
If you do not know what you lost, you either have to do some digging and fine out using IT forrentics principles or do a full restore.
Unless you know the cylinder information for the old partition, you'll have to guess or use recovery tools to help you do forentic analysis on the disk to see if you can find what the values should be. That assumes no data was wiped out by Window's Disk Manager - which it may very well have been. Hopefully somebody on here would know.
It can be easy - if you have the information required to know what was lost, and know what to set it to. Nobody here can tell you since we don't know your system before you deleted things - and exactly what was deleted. There are plenty of tools out there to help you diagnose and search for lost partitions, but that will not help you if more than just the partition entry was deleted. Since we don't know what you did, it's impossible to tell you what to do.
Monday, November 30, 2015
Sunday, November 29, 2015
How to disable USB storage device and external Hard Disk Fedora?
Issue:
How to disable USB storage device and external Hard Disk ( Note:- Don't want to disable USB keyboard and mouse ) in Red hat 7 and CentOS 7.
Solution:
You have to edit and write a few udev policy rules.
You cannot "disable" it (easily) - remove the plugs from the mother board, inactivate them in the bios is as close as you get to disabling things completely. In the end, the way to prevent it's use is to not install software to use a feature, and not provide physical access to a system. Once it's known by the BIOS it's known to the system. You can completely remove USB support from the kernel, but you can still work around that in theory.
So remove FUSE, use udev to set security so the devices cannot be accessed by end users (note that anyone can create device file and use that - so you need other system security like selinux to block for those options). http://weininger.net/how-to-write-udev-rules-for-usb-devices.html is an example of how to do udev. UDev is quite complex and has many many rules that you'll need to visit.
Saturday, November 28, 2015
Which course is best for future life? CCNA or Windows Server or Redhat linux
Deciding career between CCNA or Windows Server or Redhat linux:
You're going to get 100 answers to that question, nobody can really tell the future. We don't know your background, we don't know the area you live in, your ability to relocate if need be etc. All of which impacts an answer that is useful for you. While data centers are now Linux and Windows primarily, that may not be what you end up working with. You may do Windows support more than anything, or maybe you end up as a storage admin which is skills you don't even list.
The internet runs on Linux - no doubt about it. But are those companies hiring where you live? Or are the companies where you live still mainly using Windows? In the next 4-5 years are you expecting to move to another area? If not, it's the area you live in mainly need Windows skills that is what you need to focus on. If they do Linux then focus on that. If they do both, do both! Common for all IT is networking, so that's not a bad skill to have.
So there's no way you are going to just be able to pick ONE of those. With time you should aim at getting all of them, and then some. Right now, your focus should be on what gets you hired or paid better at companies in your neighborhood You can find that using websites like Payscale, Glassdoor etc.
You're going to get 100 answers to that question, nobody can really tell the future. We don't know your background, we don't know the area you live in, your ability to relocate if need be etc. All of which impacts an answer that is useful for you. While data centers are now Linux and Windows primarily, that may not be what you end up working with. You may do Windows support more than anything, or maybe you end up as a storage admin which is skills you don't even list.
The internet runs on Linux - no doubt about it. But are those companies hiring where you live? Or are the companies where you live still mainly using Windows? In the next 4-5 years are you expecting to move to another area? If not, it's the area you live in mainly need Windows skills that is what you need to focus on. If they do Linux then focus on that. If they do both, do both! Common for all IT is networking, so that's not a bad skill to have.
So there's no way you are going to just be able to pick ONE of those. With time you should aim at getting all of them, and then some. Right now, your focus should be on what gets you hired or paid better at companies in your neighborhood You can find that using websites like Payscale, Glassdoor etc.
Friday, November 27, 2015
All the ports are open in Linux by default?
Recently I got a question in my mail from Seth - All the ports are open in Linux by default?
Linux is a kernel - no more, no less. A ton of software is needed in addition to the kernel, and you have a lot of options in regards to what software, and what it needs to do. That's why we have hundreds of distributions and even more if you include embedded devices that all are "Linux" but very very different. So when you ask what "Linux" does, it makes NO SENSE what so ever. You have to be specific here otherwise you're not going to get much of an answer - or rather something that is useful to you.
Presuming you're talking about RHEL or at least CentOS here - and that's a very big if - the firewall is enabled by default yes and will block all but port 22 incoming traffic.
Even some ports like 80 willnot be open on RHEL/CentOS after a default install. The only way you can get http and other services to work without opening the ports in the firewall, is by disabling the firewall (or not installing it).
Btw - note that different installation options results in different configurations. Every installation you do, you should NEVER assume a default setup - always explicitly set the features you depend on.
Linux is a kernel - no more, no less. A ton of software is needed in addition to the kernel, and you have a lot of options in regards to what software, and what it needs to do. That's why we have hundreds of distributions and even more if you include embedded devices that all are "Linux" but very very different. So when you ask what "Linux" does, it makes NO SENSE what so ever. You have to be specific here otherwise you're not going to get much of an answer - or rather something that is useful to you.
Presuming you're talking about RHEL or at least CentOS here - and that's a very big if - the firewall is enabled by default yes and will block all but port 22 incoming traffic.
Even some ports like 80 willnot be open on RHEL/CentOS after a default install. The only way you can get http and other services to work without opening the ports in the firewall, is by disabling the firewall (or not installing it).
Btw - note that different installation options results in different configurations. Every installation you do, you should NEVER assume a default setup - always explicitly set the features you depend on.
Tuesday, August 25, 2015
OpenLdap permission denied issue
While starting the ldap service you will get following error:
ldif_read_file: Permission denied for "/etc/ldap/slapd.d/cn=config.ldif"
slapadd: bad configuration file!
Solution:
Change permission to ldap. The command is
chown ldap. /etc/openldap/slapd.d
Tuesday, August 18, 2015
Command to find out top 10 most CPU-occupying processes
I hope you know how to interpret average CPU load figures first. I have seen lot of people thinking that if average load is more than 1.0 then it's too much load.
To figure out top 10 most CPU-occupying processes:
ps aux | sort -r -nk6 | head -10
To figure out top 10 most CPU-occupying processes:
ps aux | sort -r -nk6 | head -10
Tuesday, August 11, 2015
Why can't I update RHEL for free?
Red Hat Enterprise Linux is primarily used for commercial support type systems. When you purchase a Red Hat subscription, not only do you get access to support, updates but also an extensive knowledge base and other help to ensure your systems are correctly and optimal configured. You have people to talk to if you have questions or problems, and if things go really bad you'll even get people on site to help you.
As you probably also know, there are tons of training and other help available with Red Hat Enterprise Linux too which are separate purchases.
The question you'll need to ask yourself is why you're looking for RHEL - if you are doing so because you're going to setup servers for work and mission critical systems, please reach out to Red Hat sales and they'll help you pick and chose the right options. But if you're doing so for learning and home use only, the benefits of using a Red Hat Enterprise Linux version may not be worth the price. If you're a developer creating content that needs to run on RHEL, you can actually get RHEL very cheap or even free if certain conditions are met.
As others have said, you can download RHEL from http://access.redhat.com. Downloading the ISO is only the first step; registering and setting things up on access.redhat.com to support your systems is very important too. And eval version gives you access to everything at Red Hat in a short period of time. But unlike other vendors, once the eval expires the software does not stop working, nor is it illegal to use it. You just lose the ability to update and access to knowledgebase, support etc. - but your system keeps running. Look at this like you would a magazine subscription - once the subscription expires, you can still keep and read the old issues. You just don't get any new ones. That's how RHEL works.
For practice and learning there are lots of great resources on access.redhat.com too - ie. how to configure DNS servers, DHCP, clustering etc. - created specifically for the version of RHEL that you're using, validated and verified. That includes forums to ask questions and help others.
CentOS has similar resources but they aren't guaranteed to work. It's entirely maintained by community members, who may use different versions and setups than you are etc. - but then again, that may provide the challenge for you to actually learn how things work instead of just following instructions. There are good guides out there for CentOS and bad ones. But it's free and if all you are looking for is something to learn from, it's a pretty good platform.
As you probably also know, there are tons of training and other help available with Red Hat Enterprise Linux too which are separate purchases.
The question you'll need to ask yourself is why you're looking for RHEL - if you are doing so because you're going to setup servers for work and mission critical systems, please reach out to Red Hat sales and they'll help you pick and chose the right options. But if you're doing so for learning and home use only, the benefits of using a Red Hat Enterprise Linux version may not be worth the price. If you're a developer creating content that needs to run on RHEL, you can actually get RHEL very cheap or even free if certain conditions are met.
As others have said, you can download RHEL from http://access.redhat.com. Downloading the ISO is only the first step; registering and setting things up on access.redhat.com to support your systems is very important too. And eval version gives you access to everything at Red Hat in a short period of time. But unlike other vendors, once the eval expires the software does not stop working, nor is it illegal to use it. You just lose the ability to update and access to knowledgebase, support etc. - but your system keeps running. Look at this like you would a magazine subscription - once the subscription expires, you can still keep and read the old issues. You just don't get any new ones. That's how RHEL works.
For practice and learning there are lots of great resources on access.redhat.com too - ie. how to configure DNS servers, DHCP, clustering etc. - created specifically for the version of RHEL that you're using, validated and verified. That includes forums to ask questions and help others.
CentOS has similar resources but they aren't guaranteed to work. It's entirely maintained by community members, who may use different versions and setups than you are etc. - but then again, that may provide the challenge for you to actually learn how things work instead of just following instructions. There are good guides out there for CentOS and bad ones. But it's free and if all you are looking for is something to learn from, it's a pretty good platform.
Subscribe to:
Posts (Atom)