{"id":607,"date":"2017-03-01T14:09:16","date_gmt":"2017-03-01T14:09:16","guid":{"rendered":"https:\/\/visworlditsolution.wordpress.com\/?p=607"},"modified":"2017-03-01T14:09:16","modified_gmt":"2017-03-01T14:09:16","slug":"how-to-create-encrypt-and-secure-partition-in-redhat-linux-server","status":"publish","type":"post","link":"https:\/\/linux.thingsomething.com\/index.php\/2017\/03\/01\/how-to-create-encrypt-and-secure-partition-in-redhat-linux-server\/","title":{"rendered":"How to create encrypt and secure partition in RedHat Linux Server"},"content":{"rendered":"<p>Hello guys in this tutorial we are going to learn how to create encrypt partition in redhat linux server. today world everybody want that our data become secure. we know we have our computer password. So how can anybody create problem for our system.But in case your hard drive loss or any person by mistake take our system password \u00a0and \u00a0have you very important data in this. then maybe \u00a0you not want anybody access your herd drive data. so there for we will create disk encrypt security layer on our herd disk partition\u00a0<img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-608\" src=\"https:\/\/visworlditsolution.files.wordpress.com\/2017\/02\/014.jpg?w=300\" alt=\"partition enccrypt\" width=\"624\" height=\"283\" \/><\/p>\n<p>Step 1 &#8211; first we will create partition below Commands<\/p>\n<pre><span style=\"color:#008000;\"><strong>[root@localhost ~]# fdisk \/dev\/sda<\/strong><\/span>\n<span style=\"color:#0000ff;\">The number of cylinders for this disk is set to 5345.\nThere is nothing wrong with that, but this is larger than 1024,\nand could in certain setups cause problems with:\n1) software that runs at boot time (e.g., old versions of LILO)\n2) booting and partitioning software from other OSs\n   (e.g., DOS FDISK, OS\/2 FDISK)\nCommand (m for help): n\nCommand action\n   l   logical (5 or over)\n   p   primary partition (1-4)<\/span>\n<span style=\"color:#008000;\"><strong>l<\/strong><\/span>\n<span style=\"color:#0000ff;\">First cylinder (4488-5345, default 4488):\nUsing default value 4488\nLast cylinder or +size or +sizeM or +sizeK (4488-5345, default 5345):<\/span><strong><span style=\"color:#008000;\"> +200M<\/span><\/strong>\n<span style=\"color:#0000ff;\">Command (m for help):<strong><span style=\"color:#008000;\"> p<\/span><\/strong>\nDisk \/dev\/sda: 43.9 GB, 43965677568 bytes\n255 heads, 63 sectors\/track, 5345 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sda1   *           1        3187    25599546   83  Linux\n\/dev\/sda2            3188        4462    10241437+  82  Linux swap \/ Solaris\n\/dev\/sda4            4463        5345     7092697+   5  Extended\n\/dev\/sda5            4463        4487      200781   83  Linux<\/span>\n<strong><span style=\"color:#ff0000;\">\/dev\/sda6            4488        4512      200781   83  Linux<\/span><\/strong>\n<span style=\"color:#0000ff;\">Command (m for help):<span style=\"color:#008000;\"><strong> w<\/strong><\/span>\nThe partition table has been altered!\nCalling ioctl() to re-read partition table.\nWARNING: Re-reading the partition table failed with error 16: Device or resource busy.\nThe kernel still uses the old table.\nThe new table will be used at the next reboot.\nSyncing disks.<\/span><\/pre>\n<p>Step 2 now we will encrypt partition \/dev\/sda6 below Commands<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]# cryptsetup -y -v luksFormat \/dev\/sda6<\/span><\/strong><\/pre>\n<p>Step 3 here we will create mapping for partition<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]#cryptsetup luksOpen \/dev\/sda6 vishnu<\/span><\/strong><\/pre>\n<p>Step 4 we can look status through below Commands<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]cryptsetup status vishnu<\/span><\/strong><\/pre>\n<p>Step5 now we will format Partition and mount it<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]mkfs.ext3 \/dev\/mapper\/vishnu<\/span><\/strong><\/pre>\n<p>Step6 then we will mount in any folder here i create data1 folder<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]mkdir \/data1<\/span><\/strong><\/pre>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]mount \/dev\/mapper\/vishnu\n\n<\/span><\/strong><\/pre>\n<p>Step 7 now if we want Secure our data we will unmount partition<\/p>\n<pre><strong><span style=\"color:#008000;\">[root@localhost ~]umount data1<\/span><\/strong><\/pre>\n<p>when we will configure security on our herd disk partition. any body can&#8217;t access our data if we want access our data in feature \u00a0then we will need to mount our partition. so mounting time system will be asking our partition password. if you have any problem in this process so comments here i will solve your problem<\/p>\n<p>Thank you<\/p>\n<p>by Vishnu Sharma<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello guys in this tutorial we are going to learn how to create encrypt partition in redhat linux server. today world everybody want that our &hellip; <span class=\"ml-btn\"><a href=\"https:\/\/linux.thingsomething.com\/index.php\/2017\/03\/01\/how-to-create-encrypt-and-secure-partition-in-redhat-linux-server\/\" class=\"more-link\">Read More<\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_uf_show_specific_survey":0,"_uf_disable_surveys":false,"footnotes":""},"categories":[8,13],"tags":[156,157,181],"class_list":["post-607","post","type-post","status-publish","format-standard","hentry","category-linux-rhel5","category-security","tag-how-to-secure-our-herd-disk","tag-how-to-secure-our-partition","tag-partition-encrypt"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/607"}],"collection":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/comments?post=607"}],"version-history":[{"count":0,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/posts\/607\/revisions"}],"wp:attachment":[{"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/media?parent=607"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/categories?post=607"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux.thingsomething.com\/index.php\/wp-json\/wp\/v2\/tags?post=607"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}