Thursday, June 9, 2011

Using and Understanding IPv6 on openSUSE 11

Desktop - OpenSUSE

ipv6So IPv6 has been around a while now but do we know any benefits? We may know that it is 128bits long and too difficult to type but if that is all then we do ourselves a little injustice in not knowing how easy IPv6 can make our lives. So let us take a look at some of the automation features of IPv6 including auto-address assignment, router discovery and why we do not need a broadcast address.

IPv6 Addresses

There are different address spaces, or types, within the new protocol. These types define their scope (or where they are effective). But first we look at the addressing scheme. Yes, the address is 128 bits but is written in hexadecimal (hex).
Each hex character represents 4 binary bits. The address is then written in blocks of 4 hex numbers (4 * 4 bits = 16 bits per block) delimited by a colon. This will mean that or address is written as 32 hex characters within the following range:

0000:0000:0000:0000:0000:0000:0000:00000
FFFF: FFFF FFFF: FFFF: FFFF: FFFF: FFFF: FFFF

Main Points

  1. 128 bits
  2. 8 words which are colon separated
  3. Each word is 4 hex characters or 16 bits

Why use IPv6

We are still going to have IPv4 for the foreseeable future, the next 10 years or so. But IANA the governing body of the internet are running out of IPv4 Addresses. The central body are down to their last /8(1000 addresses) as is the Asia Pacific Local Authority. This means that in the APAC region IPv4 will only be issued to customers who can prove they are implementing IPv6 but have a proven need for the addresses. Public addresses are a limited resource that is running out.
IPv6 addressed being so much longer have vastly more addresses, trillions per person on earth so it is difficult to see how we could run out of IPv6 addresses. Technology improvements in the header of IPv6 will allow for better access and sharing of resources though built in Quality of Service (QoS), for example Remote Desktop Protocol (RDP) will require a constant bandwidth stream whereas as http, the main web browsing protocol works well with less consistent bandwidth . Major factors in adoption will also the automation features built-in to IPv6 where services such as gateways and DNS can be detected on the network without configuration.

Global Addresses

These addresses are public addresses that are issued on the internet and often begin with 2001:. This could give us a possible host with the ip-address of:
2001:0000:0000:0000:0000:0000:0000:0001
Do not fear - we have a form of shorthand that will allow us to omit leading zeros in each 4 block section so the address will become shortened to the following:
2001::1
NOTE: 2001:: is the first release of IPv6 Global Address. A real address would start 2001: the second word would then be an identifier for your Region in the World. Your ISP would then issue you a range using the third word. The prefix would then be /48 (3 * 16). The fourth bit you could then subnet yourself within your own enterprise to give you a /64 bit prefix. Below we see the network portion or first 64 bits in the four words of a typical global address:

2001
Regional ID
Your assigned prefix
Enterprise Subnet

Local Host

The local host (as in IPv4 127.0.0.1) will be addressed as:
0000:0000:0000:0000:0000:0000:0000:0001, or more simply:
::1
The output of “netstat –ant –inet6” from my openSUSE 11 box is shown below:
  1. Anything listed as listening on the Local Address ::1 is listening on the internal or loopback adaptor
  2. Anything listed as listening on the Local Address :: is listening on all IPv6 Interfaces
  3. Ignore the extra colon. This is normal and separates the IPv6 address from the port.
IPv6 Netstat

Link-Local Addresses

These start FE80:000o:0000:0000 and end with the MAC address of the host ensuring the uniqueness of the address on the network. The scope is restricted to the local network, and all hosts on it. This network scope cannot be routed and has no access to the internet. However, this does mean we have auto-configuration of the local hosts on our network. We do not need to set anything for communication to work locally. You may compare the Link-Local address with the 169.254 addresses in IPv4.
The network is written as FE80::/64. Indicating the network portion is 64 bits and the last 64 bits make up the host. In IPv4 this would be called the subnet-mask, in IPv6 this is called the prefix.
IPv6 Ethernet Adapter
The previous image shows the Link-local address from a Windows 7 machine. The %20 on the end is just used to identify the connection, or in other words, distinguishing between eth0 and eth1 if it were Linux.
Below is the Link-local address shown from openSUSE 11.As you can see the network address is the same as in Windows 7, FE80::/64
IPv6 Desktop

Unique Local Addresses

These addresses may compare with the private addresses in IPv4 such as 10.0.0.0, 172.16.0.0 and 192.168.0.0. The IPv6 range is FC00::/7 The first 7 bits must start 1111110 in binary. For the first 8 bits (2 hex characters) this would give a range starting 11111100 to 11111101 or in hex: FC to FD
When using a ULA it is normal to generate a unique address with a /48 prefix and then create your own subnets within the 4th hex word. The first 48 bits, or three words,being your ULA and bits 49-64, the fourth word, used for your subnet. This allows for a /64 bit prefix and use of MAC addresses to represent the 64 bits of the host.
To generate your own ULA use one of you MAC address from a network you own, (Network Card Serial Number), and use the online calculator to generate your /48 bit prefix: http://www.sixxs.net/tools/grh/ula/
IPv6 Unique Local Addresses
It does not matter which MAC address you choose to use in the calculator, it is just a method of ensuring a unique input. Even though ULAs do not connect directly to the internet, there is just no need to use the same addresses on every network in the way we have become used to with the 192.168 network in IPv4.
You can see from the output of the calculator above the prefix FD81:2043:94E6::/48 has been created for my use. With the complete use of the 4thword (bit 49 – 64), this would give me 65,000 subnets I could use if I opted for the /64 prefix.

FD81:2043:94E6::/64
FD81:2043:94E6::/64

All Hosts

There is no broadcast address for the network but we can access “all hosts” though the Multicast Address ff02::1
On linux if we use the command:
Ping6 –I eth0 ff02::1 we will see a response from each host
On Windows if we use the command:
Ping -6 ff02::1 we will see the response from the multicast group.

All Routers

Especially in smaller offices or home networks there is no need to configure a gateway for your clients as there is a multicast group for all routers: ff02::2. If the group exists on your network then you have an IPv6 Router. Again we can check for the existence of such devices by pinging the multicast address.
In short IPv6 will save us time and effort and these are only a few of the new features that are incorporated in the new protocol. We will need to learn more but the sooner the start the sooner we will become familiar with the new features within IPv6.

Tuesday, June 7, 2011

Undelete Files on an ext3 or ext4 File System


So you’ve been futzing round in the file system, and been over vigorous with the rm command and deleted a crucial file that you or (more scarily) a significant other, can’t live without. What to do? After that initial hot flush has died down, you must be calm, and work fast. You have three options:

if the file is still open in a running application

To be honest, I can’t imagine this happening a lot, but it’s possible. The scenario is this: you’re editing/using a file in an application, and whilst the application is still open, you delete the file. If this happens to you, then recovery of the file is pretty simple using a tool that should already be installed on your system. So:

step1:

Do not close any applications!

step2:

Open a terminal, and type:
lsof | grep "/path/to/file"
If the file is being used by a running application, then you should get something like this:
progname 5559 user 22r REG 8,5 1282410 1294349 /path/to/file
If you get no output, then the file isn’t being used by a running application, and you’ll need to use one of the other methods.

step3:

Looking at the output from step2, you’ll need the numbers from the 2nd and 4th column (ie. 5559 and 22r). With the second number, drop the “r” (leaving “22″). Now type the following command:
cp /proc/5559/fd/22 /path/to/restored.file
And voila, your file should be back in the form of /path/to/restored.file.
Easy.

using extundelete

Extundelete is a very useful little program for restoring deleted files. It should be able to restore files from ext2, ext3 and ext4 partitions. Restoring ext3 and ext4 is a very difficult process, because the journalling part of the file system deletes the information that points to where a file’s data is on the disk when it’s deleted, unlike the ext2 system, which leaves it in place. But fortunately for us, very often, that pointer information is still in the file system’s journal, and therefore this information can be used to find the data on the disk and restore it. So, with that said, on with the show.
First you’ll need to install extundelete. If your distro doesn’t have a pre-built package, then you’ll have to compile it from source. You can get the source from here. If you need help compiling a tarball, check out this page.

step1:

As soon as possible, you need to mount the relevant partition as read-only. The sooner you do this the better, so that there is no risk of another program writing data over the top of your recently deleted file. To do this, open a terminal, and type:
mount -o remount,ro /dev/partition
The partition will be something like /dev/sda2 or /dev/sdb1. You can find the relevant device by typing mount in a terminal. You’ll get an output like:
matt@mailserver:~$ mount
/dev/sdb1 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
none on /lib/init/rw type tmpfs (rw,nosuid,mode=0755)
none on /var/lib/ureadahead/debugfs type debugfs (rw,relatime)
/dev/sdc1 on /media/disk type vfat (rw,noexec,nosuid,nodev)
/dev/sdb2 on /home type ext3 (rw)
/dev/sda1 on /home/matt/storage type ext3 (rw)
/dev/sdd1 on /media/temp type vfat (rw)
/dev/sde1 on /media/disk1 type vfat (rw)
/dev/sdf1 on /media/disk2 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
So, if I want to make my /home partition read-only, it would be /dev/sdb2. Once you’ve mounted it read-only, you can relax a bit. At least you won’t be risking making the situation worse.

step2:

Now you can use the extundelete command to restore your file. extundelete can be used to restore all deleted files from a partition, or a specific file or directory. In this example we’ll just be restoring a specific file, but for more options, look here. To restore the deleted file, type the following into a terminal:
extundelete --restore-file /path/to/deleted/file

step3:

extundelete (if it works) should restore the file to a subdirectory in the current directory called RECOVERED_FILES. Voila – problem solved.

using photorec

If extundelete doesn’t work, then you can try photorec. Photorec works in a different way to extundelete. Instead of trying to find the information that points to where the deleted file data is on the disk, it tries to find the data by parsing the data itself to identify files. This method is less targeted than extundelete, but may still work if the information pointing to the file has been deleted from the journal. Photorec can find deleted files of a particular type. So if you’ve deleted a .mp3 file, you would get Photorec to find all deleted .mp3 files and hope that it finds the file you’re looking for. Photorec seems to be well supported on the main distros, so you should be able to find a package for easy install. So:

step1:

Rather than list the process in detail here, there is a very good explanation of the steps on the photorec wiki.
That’s it. Happy undeleting and remember prevention is always better than the cure. Backup.

Tuesday, May 24, 2011

How to Use GNU Screen


On UNIX, GNU Screen is a utility that i cannot live without. I know many console users share the same point of view with me.

What is GNU Screen? it is a terminal multiplexer and you can run multiple console-based applications simultaneously.

The best part of it is that you can leave it running on remote machines and come back to pick up your console sessions.

It’s like VNC or Remote Desktop but for UNIX console. As you know that on UNIX if you run something on a shell and you got disconnected from it then your sessions will also stop. All work will be gone.

With that feature GNU Screen is indispensable when it comes to do console sessions on low speed connection. If you got disconnected then all you have to do is reconnect and continue with your work. Or if you do something that takes a long time to finish, say maybe archiving and backing up many files, then simply launch it from GNU Screen session then detach from it and disconnect. Later on you can come back and reattach again to check the progress.

Anyway, here are some most useful features of GNU Screen that i use most of the time.
GNU Screen Most Used Commands
Commands What It Does
Ctrl-a ? (question mark)
GNU Screen's help pagehelp page
Open the help page. Also remember that “man” and “info” is your friend. By typing “man screen” and “info screen” you’ll get a lot of informations regarding Screen.
Ctrl-a d
resuming GNU Screen's sessionresuming session
Detach from the current Screen session and leave the process running in the background. Use “screen -r” to resume the session. If there are several Screen sessions running then add the session ID to the end of it. Ex: “screen -r 1088“. What really nice is that means you can login from anywhere to start your Screen session then later on continue the session again from different place.
Ctrl-a k
trying to kill a window in gnu screenkill a window
Kill current window. If you have another window active then Screen will move on to that window. If this is the only window to it then Screen will kill the window and exit, therefore ended the session.
Ctrl-a c Create a new window. By default it creates a new shell instance according your system setup (usually 90% of the time this is either bash or tcsh).
Ctrl-a A (capital A)
set title of current window in gnu screenset title
Rename current window. If you have so many windows running then i would suggest you name them so you won’t be lost.
Ctrl-a ” (double quote)
gnu screen showing list of active windows in current sessionlist of active windows
Show list of active windows in the current session.
Ctrl-a n, Ctrl-a p If you have multiple windows running then this command will do the flipping between the next window (using “Ctrl-a n”) and the previous window (using “Ctrl-a p”).
Ctrl-a h
gnu screen telling that it's logging to a file01. logging to a file
log file from a gnu screen window02. the log file
Create a running log (history). It will says “Screen image written to …” (see image 01). The file actually resides in your home directory (see image 02)
Ctrl-a ESC, Ctrl-a ]
entering gnu screen's copy modeA. entering copy mode
highlight the selection before copy it into gnu screen's bufferB. highlight the selection
gnu screen copied text into bufferC. copied into buffer
pasting text from gnu screen's bufferD. pasting text
Press “Ctrl-a ESC” will makes you temporary enter the copy buffer mode (see image A). You can tell when it says “Copy Mode …”.

In copy buffer mode you can move the cursor freely using directional keys. In this example i’m “cat”-ing the content of the Message of the Day (/etc/motd) in my Ubuntu machine. Next step is to highlight the block that you want to copy to the buffer. Move your cursor to the beginning of the block that you want to copy then press enter. That will mark the start point of the block.

Then move your cursor toward the end of the block that you want to copy (see image B). In this example i’m copying the text “System Information …” from Ubuntu’s MOTD

Press enter again to copy the highlighted block into the buffer. This will end the “Copy Mode” and put you back to the active screen. You can tell when it says “Copied # characters into buffer” (see image C)

Use “Ctrl-a ]” to paste whatever is in the buffer (see image D). As you can see i’m pasting the text “System Information …” from the Screen’s copy buffer.

Sunday, May 15, 2011

4 Popular opensource Project Management applications


Opensource Project Management Apps are the key to success in many an organization and in personal life for task management too. Open source provides the rightopensource--t platform for development of project management apps that are highly adaptable, flexible and ensure the project renders all deliverables. Introduced here are some of the popular open sources Apps for Project Management.

dotProject

The most delightful fact of opensource apps is that you could work directly on the codes and customize projects perfectly for your business environment. dotProject is one such project management app that ensures you achieve maximum success on every project as enriched features of flexibility, adaptability can be retained even as you tweak the freely available source code to your ecosystem. That the technology is sophisticated and cutting edge is indisputable because of the immense volunteers group, which is skilled and extremely talented.
What you get with dotProject is the satisfaction of tailoring your project management solutions on your time, on your strengths but with well developed and structured technology that ensures you achieve the end deliverables of every project.

Achievo

Achievo is what every true open source project management software needs to be. It is web-based, has critical essentials such as powerful tracking tools meant for small to medium companies, and is available in 20 languages.
What make Achievo a top-rated popular open source project are power features that helps businesses to track the drivers of a project - resources, clients, planning, daily scheduling. Robust features such as time registration and report generation, integrated customer relationship management, human resource management and most importantly scheduling ensure complete project control.
The reason for using such an app would be its complete adaptable features due to the central database interfacing on multiple modules ensuring optimized combination of all intranet applications. This helps applications retain their network environment. As the solutions are server-end, the system can be independently integrated into existing infrastructure.

GanttProject

If you are looking for project management solutions that have high platform migration features then this project is what you need to explore. It comes with powerful features and runs easily on Windows, MacOSX to Linux. It is superb as a project scheduler and essentially helps in overcoming critical situations of project management.
Some of the discerning features include Gantt chart, PERT chart, Interoperating facilities for importing into Microsoft Project as well as spreadsheets along with CSV. WebDAV is another platform for collaborative project development.

Faces

Is Python-based high-function multi-purpose program that is flexible, automated, simulating tool. For those of you familiar and keen on Python features will find working on the ‘Swiss Army knife’ of Project Management a very useful tool to explore. Ideal for quick, effective code tweaking to customize project management, Faces ensures you save on time, costs and the required resources to manage the project.
Opensource is the best alternative for mission-critical management of projects for small to big enterprises. Opensource gives project managers flexibility, latest technology and cost-effective resource management for successful completion of Projects.

Thursday, May 12, 2011

SHA-512 w/ per User Salts is Not Enough


Back in January, I was having a causal conversation about passwords at a local gathering about security and was asked what we use for storing the passwords.

I stated that we are using sha-512 w/ per user salts but we are looking at moving away from this standard to something much stronger.

The response that I received from this person was pretty much in line with other comments I have received and seen on some of our forums.

The two most common responses are: “Oh good, you are using per user salts” and “yeah, using sha-512 is much better than md5.”

Granted, these comments are true, using sha-512 is better than using md5 and better than not using per user salts but there is still a weakness that I feel is overlooked.

Per user salts do provide value, but the problem is that they are typically stored with the hash. So the entry in the database looks something like this:


sha512${salt}${hash}

Or perhaps the hash is stored in a separate column or table and is grabbed as needed during password verification. Either way, both the hash and salt are stored in the same database.

In the event the hash was disclosed or the database was compromised, the attacker will already have one of the two values (i.e. the salt), used to construct the hash.

All the attacker needs to do now is figure out the password entered into the hash formula and the order in which it was used. Order being:


hash = hash_operation({password} + {salt}) or;
hash = hash_operation({salt} + {password})


The two issues with this are:
1) since our source code is public, the order in which we salt is also public and;
2) due to our scale and usability, we store the hash and salt in the same place.


What am I getting at? The real problem is that we shouldn’t be solely replying on hashing algorithms to secure this data. Once the salt is known, it would be pretty trivial to dictionary a bunch of hashes in little or no time and get a pretty significant hit rate. (More to follow on this subject to follow in another post)


What is the solution? Right now the solution is moving away from sha-512 w/ per user salts to something like bcrypt but with a twist.

The twist is adding in a layer of defense plus adding some controls over who can unlock the password equation.

In pseudo code, this is what I mean:


{hmac_result} = hmac_create_operation( user_password + system_shared_password )
{bcrypt_result} = bcrypt_create_operation(( hmac_result + salt ) bcrypt iterations)


The bcrypt result would be stored in the database like this:


bcrypt$bcrypt_result$shared_key_version

The system_shared_password (aka nonce) is not stored within the database. Instead this data is stored on the operating system within a protected file.

Using this configuration a SQL injection vulnerability that provides access to the password hash data would not provide access to the system_shared_password.

Only under the scenario of a full system compromise would both secrets (password hashes, system_shared_password) be compromised.

We feel this solution gives us better controls around who can unlock the hashes and provides a layer of defense around the hashes. We also have put some code together thanks to fwenzel:


Why use per user salts at all? Two reasons, first per user salts ensure that two users with the same password will not have the same hash. Second, the use of salts prevents an attacker from using a precomputed rainbow table against the hashes.

More to come on this subject, as our goal is to increase security and the time in which it would take in order to brute or dictionary the hash. Our goal is and always to provide better protection around authentication systems.

70 صفة للمدير الناجح


كل منا له مدير يعمل تحت إشرافه، ربما يكون هذا المدير هو العقبة التي تقف في طريق الشخص للوصول لهدفه.. أو ربما يكون العكس فمديره هو من يعينه في تحقيق أهدافه وإيصال أفكاره للإدارة.
وفي الوقت الذي أظهرت نتائج استطلاع مركز جالوب الأمريكي أن المديرين هم سبب ترك الموظفين المتميزين لشركاتهم، فأن هناك الكثير من المتميزين يعملون في مؤسساتهم رغم وجود عقبات كثيرة إلا أنهم يقرروا البقاء لا لشيء سوى أنهم يفضلون العمل تحت إشراف مدير يرون أنه يخرج أفضل ما عندهم.
نحاول هنا أن نقدم لمن كتب الله عليهم الإدارة نمطين من الإدارة عليهم الاختيار بينهم، خصوصا بعد ثورة يناير وانتشار المظاهرات في أغلب المؤسسات والشركات مطالبة بإقالة مديرهم.

1- المدير الناجح يبادرك بالتحية عندما يراك، فيلقي عليك السلام مثلاً، ثم يقول لك: حمداً لله على سلامتك، أو ما شابه ذلك من صور التحية.  والمدير الفاشل بمجرد أن يراك ينتظر أن تبدأه أنت بالتحية، وإن تكلم قال لك: "أنت جئت؟".

2- المدير الناجح شغوف بالإنصات إلى رأيك في تطوير العمل، والمدير الفاشل شغوف بالاستماع إلى ثنائك عليه.

3- المدير الناجح يقول: "أنا أعتقد كذا... فما رأيكم؟" والمدير الفاشل يقول: "أنا قررت كذا.. فنفذوا".

4- المدير الناجح يعامل أفراده وفق نظرية y، ومؤداها إحسان الظن بهم إلى أن يثبت العكس، والفاشل يتعامل وفق نظرية x ومؤداها إساءة الظن بهم إلى أن يثبت العكس.

5- المدير الناجح يضع خطة تتناسب مع قدرات مرؤوسيه، والمدير الفاشل يضع خطة دون النظر إلى إمكانات مرؤوسيه.

6- المدير الناجح يثق بالأفراد الأكْفَاء والعاملين معه، والمدير الفاشل لا يثق إلا بنفسه.

7- المدير الناجح يتحدث معك بصدق وصراحة ولباقة ولياقة وذوق، أما المدير الفاشل فيتحدث معك بكذب وخبث وبغلظة وفظاظة !!

8- المدير الناجح يسمح لك بأن تطالبه بحقك، وإذا اختلف معك يسر لك الطريق لرفع شكواك لمسئول أكبر منه دون أن يتحداك، حتى يتيح لك فرصة لأخذ حقك والحصول عليه، وهو إذ يفعل ذلك يدرك أنه ربما يكون على خطأ، فلعل الصواب يأتي من غيره، أما المدير الفاشل فلا يسمح لك بأن تشكوه لمسئوله حتى وإن كان معك الحق، وإذا فعلت ذلك تحداك وحاربك.. هو يسمح فقط بأن تمتدحه، وتثني عليه، حتى وإن كانت مواضع المدح والثناء ليست فيه.

9 - المدير الناجح يناقشك إذا قدمت استقالتك أو أبديت رغبتك فيها، والمدير الفاشل يدفعك إلى الاستقالة عندما تختلف معه، ويجبرك عليها حتى وإن كنت من ذوي الكفاءات المتميزين.

10- المدير الناجح يسعى لتثبيت أقدام الشركة وتقويتها.. والمدير الفاشل يسعى لتثبيت قدمه في الشركة وتقوية مكانته.

11- المدير الناجح يسارع في تهنئتك بالأعياد والمناسبات، ويحرص على أن يسبقك في ذلك.. والمدير الفاشل ينتظر منك أنت أن تهنئه، فإذا فاتك ذلك حاسبك، فهو حريص على أن يكدر سعادتك حتى في الأعياد والمناسبات والأوقات السعيدة.

12- المدير الناجح يثير تفكيرك، ويشحذ همتك، ويشجعك على الابتكار والإبداع والتجديد. والمدير الفاشل يثير أعصابك، ويثبط همتك، ويجبرك على النمطية والتقليد الأعمى والجمود.

13- المدير الناجح لديه مرونة في تغيير أو تطوير أي جزء من منظومة الإدارة إذا ما كان ذلك في مصلحة العمل، ويحرص على إقناع الأفراد والمعنيين قبل التغيير. والمدير الفاشل ليست لديه مرونة من ذلك، وربما إذا غير في المنظومة فعل ذلك دون إقناع الأفراد وتهيئتهم.

14- المدير الناجح يرغب في أن تقول له: "أنا أقترح". أما المدير الفاشل فيرغب في أن تقول له: "أنا أؤيدك.. وبالروح وبالدم أفديك".

15- المدير الناجح يتحكم في نفسه وأعصابه عندما تختلف معه و تهاجمه. والمدير الفاشل يحاول أن يتحكم في رزقك وعنقك إن أنت فكرت في الاختلاف معه.

16- المدير الناجح يحترم آدمية الموظف وإنسانيته.. والمدير الفاشل لا يعترف بآدمية الناس ولا يراعى إنسانيتهم .

17- المدير الناجح مقتصد في نقد الآخرين. والمدير الفاشل مسرف في نقد الآخرين. المدير الناجح حريص على رفع الروح المعنوية لدى المرؤوسين، والمدير الفاشل غير مهتم بذلك.

18- المدير الناجح يتخذ القرارات بسرعة بعد تفكير، والمدير الفاشل يتخذ القرارات ببطء قبل التفكير، ويتراجع عن القرارات بسرعة دون تفكير.
19- المدير الناجح شجاع في حواره مع رؤسائه في حكمة وذوق وأدب،والمدير الفاشل لا يجرؤ أن يصارح رؤساءه حتى وإن أخطأوا، وربما إذا صارحهم جرحهم.

20- المدير الناجح يقرأ الموضوعات والمقترحات التي تقدم له، ليستفيد منها.. والمدير الفاشل لا يقرأ، وإذا قرأ لا يفهم، وإذا فهم ربما يفصلك من العمل، لأنك خالفت هواه.

21- المدير الناجح يرى مستقبلك في تنمية ذاتك وتطوير العمل، والمدير الفاشل يرى مستقبلك في الوقوف بجانبه والانصياع لأوامره، ويرى أيضاً أن مستقبلك في يده.

22- المدير الناجح يبادر بمكافأتك، والمدير الفاشل ينتظر أن تكافأه أنت أو تقدم له هدية.

23- المدير الناجح يطور أفكارك وينسبها لك.. والمدير الفاشل يسرق أفكارك وينسبها إلى نفسه.

24- المدير الناجح يراقب العمل ويتابعك، والمدير الفاشل لا يعبأ بسير العمل، ويتجسس عليك.

25- المدير الناجح يفضل أن يشيد بجهودك ويمدحك أمام الآخرين،ليشجعهم على التفاني والإتقان، والمدير الفاشل يفضل أن تمدحه أنت أمام الآخرين، حتى تنتقل إليهم العدوى.

26- المدير الناجح يشعرك بأن يومك سعيد، والمدير الفاشل ينقلك من يوم مر إلى يوم أمرَّ.

27- المدير الناجح يراعي حالتك النفسية، والمدير الفاشل يعاملك حسب حالته المزاجية.

28- المدير الناجح يعتبر نفسه مسئولا عن أعمال المؤسسة وعمالها في جميع أحوالها، سواء في حالة النجاح أو الفشل. أما المدير الفاشل فيعتبر نفسه سبب النجاح، ومن معه سبب الفشل.

29- المدير الناجح يعتبر عمله متعة ورسالة، والمدير الفاشل يعتبر عمله ثقلاً ورئاسة وزعامة. 30 المدير الناجح يعمل وينجز بنجاح تحت ضغط الوقت، والمدير الفاشل يستسلم للظروف فييأس ويقعد.

30- المدير الناجح يتعامل مع الأزمات بهدوء خارجي واندفاع داخلي شديد لحلها، وهو يصدق فيه التشبيه المعروف "كالبط عند السباحة، ظاهره هادئ، لكنه يضرب برجله في الماء بقوة وسرعة".

31- المدير الناجح يفرق بين المصلحة العامة والمصلحة الخاصة، ويقدم مصلحة الجماعة على مصلحة الفرد، وتلك قاعدة شرعية مؤداها: "مصلحة الجماعة مقدمة على مصلحة الفرد إذا تعارضا".

32- المدير الناجح قادر على أن يقود الأفراد إلى إنجاز العمل في وقته المحدود وبالكفاءة المطلوبة، ومنهجه في ذلك: "لا تؤجل عمل اليوم إلى الغد"، و"إنا الله يحب إذا عمل أحدكم عملاً أن يتقنه"، والفاشل لا يستطيع إنجاز العمل في وقته بإتقان، فإما أن يؤجل ويسوف، وإما أن يأتي العمل ضعيفاً هزيلاً، وشعاره حينئذ: "ليس في الإمكان أفضل مما كان".

33- المدير الناجح صاحب رأي واضح فيما يُطرح عليه من أمور، والفاشل رأيه ضبابيّ غير واضح، وهلامي لا تستطيع أن تقف على رأيه بشكل محدد.

34- المدير الناجح لديه مرونة في التعامل مع الأفراد والمواقف، ومع ذلك فهو يسير نحو تحقيق الهدف دون انحراف عن طريقه، أما الفاشل فلا يعترف بالمرونة، وإذا أخذ بها وحاول ممارستها ضاع منه الهدف، وانحرف عن طريق تحقيقه.

35- المدير الناجح ذو أفق واسع، وينظر لكل موقف من جميع الجوانب والزوايا، وبمعنى آخر يلتقط صورة عامة للمشهد قبل أن يدخل في تفاصيله، والفاشل ينظر إلى جانب واحد من الموقف أو الظاهرة فيحجب عنه بقية الجوانب، أو تشغله التفاصيل وتغرقه، فتضيع منه الأساسيات وشمولية الصورة.

36- المدير الناجح يتصرف في المواقف الطارئة والأزمات بذكاء وثقة وسرعة بديهة، حسبما يتطلب الموقف. ويأتي هنا تصرف سيدنا أبي بكر الصديق مع أزمة الردة بعد وفاة النبي {، وموقفه } عند وفاة الرسول { كمثالين ، أما المدير الفاشل فيضطرب عند الأزمات والمواقف الطارئة، ضعيف الثقة بنفسه، وهو كثير الهروب عند الأزمات.

37- المدير الناجح موضوعي في تقويم أداء الأفراد، وعند اختيارهم للوظائف يضع الرجل المناسب في المكان المناسب، والفاشل معياره في ذلك المحسوبية، والمحاباة،واتباع هواه.

38- المدير الناجح يفوض أفراده، لتدريبهم وتنمية قدراتهم، وتكوين كوادر قيادية بالمؤسسة، ولعلاج مشكلة ضيق الوقت وتعطل المصالح، أما المدير الفاشل فلا يسمح بإنجاز أي عمل، صغيراً كان أم كبيراً، إلا بإذنه وتحت عينيه.

39- المدير الناجح عينه على كل مجالات الإدارة، يهتم بها اهتماماً متوازناً، أما المدير الفاشل فيركز على جانب أو بعض الجوانب دون الاهتمام بالجوانب الأخرى.

40- المدير الناجح قادر على رصد المواهب والكفاءات ويحسن استثمارها، والفاشل ليست لديه هذه القدرة.

41- المدير الناجح يرتاح إلى ظهور الحق حتى إن كان على لسان مخالفيه،والفاشل يحرص على أن يُثبت أنه على حق، ومن خالفه على باطل وخطأ.

42- المدير الناجح لديه الشجاعة لنقد ذاته، والفاشل لا يقدر على نقد نفسه ذاتياً.

43- المدير الناجح يُثبت التوجيهات الشفهية كتابة، ويسجلها قدر الإمكان بدقة، وخاصة مع من ينسون أو يتناسون من الأفراد. والفاشل توجيهاته غير محددة، وغير دقيقة، ويكتفي بها شفاهة.

44- المدير الناجح يطبق اللوائح مراعياً أن تحقق روحها، ويلزم نفسه بها قبل الآخرين، والفاشل يطبقها على غيره دون أن يلزم نفسه تطبيقها.

45- المدير الناجح يملؤه الأمل والتفاؤل. والفاشل يُغرق نفسه في اليأس والإحباط والتشاؤم.

46- المدير الناجح صادق في وعده، وفيّ بعهده، والفاشل مُخلف لوعده،ناقض لعهده.

47- المدير الناجح منضبط في سلوكه ووقته، والفاشل غير منضبط في سلوكه ووقته، ويطالب الآخرين بالانضباط.

48- المدير الناجح مُعتدل في كل تصرفاته، دون إفراط ولا تفريط، والفاشل إما أن يُقصّر وإما أن يغالي.

49- المدير الناجح ثقافته العامة واسعة، والفاشل لا يكترث بتنمية ذاته ثقافياً.

50- المدير الناجح يحرص على تنمية مهاراته في الإلقاء والتفاوض والإقناع، والفاشل ضعيف في هذه المهارات، وغير حريص على تنميتها لديه.

51- المدير الناجح حريص على فهم أنماط شخصيات الأفراد،ومعرفة مفتاح شخصية كل فرد. والفاشل يتعامل مع جميع الأفراد وعلى أنهم نمط واحد.

52- المدير الناجح حريص على تعرف أقوال الأفراد وتوطيد العلاقة الاجتماعية من خلال وسائلها المعروفة، كالرحلات، والمشاركة في الأفراح والمناسبات، وكذلك المواساة، والفاشل يتعامل معهم كآلات، ناسياً أو متناسياً أنهم بشر لديهم أحاسيس ومشاعر.

53- المدير الناجح لا ينكر أنه وجَّه أفراده وألقى عليهم تعليمات عندما يترتب عليها ضرر، والمدير الفاشل ينكر توجيهاته السابقة إذا ترتب عليها ضرر.

54- المدير الناجح هو الحريص دائماً على غرس الإخلاص في نفوس مرؤوسيه، لأن الإخلاص هو الدينامو الذي يحركهم ذاتياً نحو التفاني في إتقانه، والفاشل يعتمد على إرهاب الأفراد والتجسس عليهم.

55- المدير الناجح يهتم بإكساب أفراده القدرة على حل المشكلة. والفاشل لا يعبأ بذلك.

56- المدير الناجح صبور ذو نفس طويل. والمدير الفاشل عجول ذو نفس قصير.

57- المدير الناجح يحسن تقدير كل الأفراد، مهما تباينت مواقعهم وسلطاتهم، فقد كان سلفنا الصالح رضي الله عنهم أجمعين لا يُعرف القائد منهم من الجندي، والمدير الفاشل يحترم ذوي السلطان ويحتقر البسطاء.

58- المدير الناجح حريص على حسم الخلاف إذا نشب بين اثنين من مرؤوسيه، مع تحكيم العدل والإنصاف والإحسان، والمدير الفاشل لا يكترث بسوء العلاقة بين مرؤوسيه.

59- المدير الناجح يوفر للأفراد والعاملين معه الأدوات والمعدات اللازمة لأداء العمل، والمدير الفاشل يطالبهم بإجادة العمل دون اهتمام منه بتوفير أدواته ومعداته.

60- المدير الناجح حريص على حل مشكلات الأفراد، والتعامل معهم كصديق يحسن معاملة أصدقاءه. يقول "روي فلمان" وهو المسئول التنفيذي للعلاقات الداخلية بشركة "أمريكان موتورز": "قد يأتيني الموظف إلى مكتبي غاضباً، فأقابله مقابلة حسنة، أجلسه في مجلس كريم قبل أن أجلس أنا، وأطلب له كوباً من العصير، وبعد ذلك أطلب منه أن يحكي لي ما بداخله دونما أدنى مقاطعة مني، حتى يُخرج جميع ما بداخله، وأهم شيء في نظري هو أن يجد هذا الموظف من يستمع إليه، وأعرض عليه اقتراحاً لحل تلك المشكلة، فأراه وقد تبدلت حاله، من مشحون بالغضب كان يريد أن يقتلني، إلى صديق وجد من يستمع إليه.. المهم عندي هو أن يخرج من مكتبي وهو راض، فيخرج وقد حلت محلَّ شحنات الغضب شحنات الدافعية والرغبة في العمل"!!

ويؤكد ذلك "أوليفر هوليمز" وكان يعمل قاضياً لمدة ربع قرن في المحكمة الدستورية العليا بوازرة العدل الأمريكية حيث يقول: "إن أفضل أسلوب من أجل تنمية علاقة مع من تحب هو أن تستمع إليهم بإنصات وبفهم دون مقاطعتهم". أما المدير الفاشل فلا يعبأ بمشكلات الأفراد، ويبرر لنفسه بأن ذلك ليس من اختصاصه، وأنه ليس لديه وقت لذلك، وإذا أتاه صاحب مشكلة فغالباً لا يصغي إليه ولا يهتم به.

61- المدير الناجح يهتم بالتعرف على بيئة العمل وخاصة إذا كان جديداً عليه والمدير الفاشل لا يعبأ بذلك.

62- المدير الناجح يبدأ من حيث انتهى الآخرون وليس من الصفر، فلا يتخذ قراراً مضاداً لقرار المدير السابق، بهدف الاختلاف معه، بل لتصحيح المسار، والمدير الفاشل يجعل اتخاذ القرارات المضادة للإدارة السابقة هدفاً في حد ذاته.

63- المدير الناجح لا يتخذ قراراً إلا بعد اكتمال قاعدة المعلومات والبيانات المرتبطة بهذا القرار، والمدير الفاشل يتسرع في اتخاذ القرار دون اطلاعه على المعلومات والبيانات.

64- المدير الناجح لا يفتح مجالات أوسع في شركته إلا بعد دراسة وتخطيط، والمدير الفاشل يصنع ذلك دون دراسة ولا تخطيط.

65- المدير الناجح يقوم بدور قائد "الأوركسترا"، فهو يشرك جميع أعضاء الفريق في العمل، مع الحرص على إحداث التناغم والانسجام بينهم، تماماً كالانسجام بين العازفين، كي يُنجح سيمفونية العمل. والمدير الفاشل ربما حرّك جميع الأعضاء لكن دون انسجام، فيحدثون صوتاً نشازاً لدى المستمعين.

66- المدير الناجح حريص على معرفة رد فعل قرارات الإدارة على الأفراد، والمدير الفاشل يصدر القرارات ولا تهمه انعكاساتها على الأفراد.

67- المدير الناجح ييسر قنوات الاتصال به قدر الإمكان، والمدير الفاشل يسد هذه القنوات أو يعوقها.

68- المدير الناجح يشجع المرؤوسين على ممارسة الصلاحيات وتحمل المسؤوليات، والمدير الفاشل يُقَزِّم صلاحياتهم، ويورِّم مسؤولياتهم.

69- المدير الناجح حازم في غير قسوة، لين في غير تسيب، والمدير الفاشل ربما يكون قاسياً، وربما يكون فوضوياً.

70- المدير الناجح قادر على استشراف المستقبل والاستعداد له، والمدير الفاشل ينظر تحت قدميه ولا يستشرف المستقبل، وهذه القدرة مكنت يوسف عليه السلام من إدارة الأزمة الاقتصادية التي تنبأ بها من خلال تفسيره رؤيا الملك، فادخر من القمح الاحتياطي ما حلَّ به أزمة المجاعة في المستقبل، وقد ورد ذلك في سورة يوسف.

Saturday, May 7, 2011

الفاكهة والماء البارد معلومات خطيره



السلام عليكم ورحمة الله وبركاته 
الموضوع بقلم : الدكتور عبدالرحمن القحطاني

و الدكتور :  ستيفن ماك


الفاكهـــة و فـــوائدهــــا
تناول الفواكه 
نعتقد جميعا أن تناول الفاكهة يعني: شرائها ، تقطيعها ،  ثم وضعها في أفواهنا. ولكن في الحقيقة الأمر ليس بهذه السهولة فمن المهم معرفه  كيف ومتى نتناول الفواكه   . 
إذا!!ما هي الطريقة الصحيحة لتناول الفاكهة؟ 
أكل الفاكهة لا يعني تناولها بعد الطعام !
*  بل ينبغي تناولها على معدة فارغة. 
إذا كنت تأكل الفاكهة بتلك الطريقة "واعني أكل الفاكهة على معدة فارغة"  فذلك  سيؤدي بدور رئيسي  وفعال لإزالة سمية جهازك الهضمي، وفي نفس الوقت سوف يمد الجسم بقدر كبير من الطاقة اللازمة  لإنقاص الوزن وغيرها من أنشطة الحياة المتعددة . . 
  الفاكهة هي أهم غذاء  
لنفترض انك تناولت شريحتين من الخبز وبعد ذلك أكلت شريحة  فاكهة.  شريحةالفاكهة على استعداد للذهاب مباشرة من المعدة إلى الأمعاء، ولكنها منعت من القيام بذلك. 
وفي هذه الأثناء الوجبة بكاملها( شريحتي الخبز) ستتعفن  وتتخمر وتتحول إلى حامض. في اللحظة التي تلامس بها  الثمرة الطعام في المعدة والعصارة  الهضمية فان كتله الطعام تبدأ بالفساد ....

لذا رجاءا تناول الفاكهة على معدة فارغة أو قبل وجبات الطعام!

لابد انك سمعت الناس يتذمرون قائلين " في كل مرة كنت أتناول بها  البطيخ   أتجشأ" ،أو "عندما أكل فاكهه محدده  فان معدتي تنتفخ"  ، " بمجرد تناولي الموز أشعر بحاجه ملحه للذهاب إلى المرحاض"  ،... الخ  في الواقع كل هذه المشاكل لن تحدث إذا أكلت الفاكهة على معدة فارغة. ثمرة الفاكهة ستختلط مع غيرها من المواد الغذائية المتعفنة وتنتج الغاز، وبالتالي سوف تشعر بالانتفاخ ! 
 ( الشيب   ، الصلع ، الغضب ، والدوائر السوداء  تحت العين  كل  ذلك لن يحدث  إذا كنت تتناول الفاكهة ومعدتك فارغة .
 ووفقا لما ذكره الدكتور {هربرت شيلتون}  الذي اجري مجموعه من البحوث حول هذه المسألة :-" لا يوجد ما يسمى بفواكهه حمضيه مثل البرتقال والليمون ، وذلك لأن جميع الفواكه تصبح قلوية داخل أجسامنا  .إن كنت تتحكم بالطريقة الصحيحة لتناول الفواكه ، فأنك ستملك كل من  سر الجمال ، طول العمر ،الصحة والطاقة والسعادة والحصول على الوزن الطبيعي.  
عندما ترغب بشرب عصير الفاكهة   فأشرب عصير الفاكهة الطازجة فقط وليس المعلب،ولا تشرب العصير الذي تم تسخينه.
 لا تأكل الفواكه المطبوخة  لأنك لن تحصل على المواد المغذية المفيدة على الإطلاق. كل ما ستحصل عليه
http://www.hermesetas.com/images/recipes/strawberry_creams.jpghttp://www.andalusiaexpress.com/images/CaesarGuavaJuiceBottle250ml.jpghttp://www.andalusiaexpress.com/images/Nada%20Apple%20Juice%20Long%20Box.jpg
 هو  الطعم . فالطبخ يدمر الفيتامينات.
والأفضل تناول الفاكهة بكاملها بدلا من شرب العصير. ولكن  إن كان لا بد أن تشرب العصير فاشربه عن طريق الفم و ببطء، وهكذا ستسمح باختلاط  العصير مع اللعاب قبل بلعه.  
عمل حميه الفاكهة وذلك-  بالصيام لمده 3 أيام  خلالها لا تتناول أي طعام  غير الفواكه  وبذلك تطهر وتنظف الجسم.- بمعنى "مجرد أكل الفاكهة وشرب عصير الفواكه طوال 3 أيام " ، وسوف تفاجأ عندما يقول لك  أصدقائك كم تبدو مشرقا ومبتهجا ! 

ثمار الكيوي : الكيوي ثمره صغيرة ولكن قوية. فهي   مصدر   جيد للبوتاسيوم  والمغنيسوم وفيتامين 
http://www.jor1jo.com/up/uploads/images/jor1jo-e42b702874.jpghttp://www.jor1jo.com/up/uploads/images/jor1jo-e42b702874.jpghttp://www.jor1jo.com/up/uploads/images/jor1jo-e42b702874.jpg
 E بالاضافه للألياف .كما أنها تحتوي على ضعفي كميه فيتامين  C  الموجودة في البرتقال  ثمار التفاح  : تفاحة يوميا تغنيك عن الطبيب؟ على الرغم من إن  التفاح يحتوي على نسبة منخفضة من
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiswuOJxowBJh9mSNvjeqjAysJSBs7KgDRDJUBYiFTli1YXMMYmbs9cs8e7ohm-D0fZZVoxj_iRYNjLQrWJMQ6fFp2CUeMbqkqTduBucb0f3V9nk5erLxfbDdIE3YcmpDBdG6Jy-P3D/s400/red+apple.jpghttp://dubaieyes.net/up/upadmin/12619800001420144413738-1181442431.jpghttp://saadou2006.jeeran.com/files/47131.jpg
فيتامين C، ولكنه يحتوى  على المواد المضادة للأكسدة  التي تعزز من نشاط فيتامين (C) مما يساعد على خفض مخاطر الإصابة بسرطان القولون ، أو الإصابة  بنوبة قلبية والسكتة الدماغية.
ثمار الفراولة : تعتبر الفراولة فاكهه الحماية والوقاية. وتحتوي على أعلى نسبه مضاد للأكسدة بين أهم أنواع الفاكهة.كما تحمي و الجسم من مسببات السرطان ،ومن  انسداد الأوعية الدموية  . 
ثمار البرتقال : أحلى دواء. فان تناولت مابين 2-4 من البرتقال يوميا فستبعد عنك نزلات البرد وسيخفض
http://www.masrawy.com/Ketabat/Images/25-5-2010-4-0-23677.jpghttp://www.masrawy.com/Ketabat/Images/25-5-2010-4-0-23677.jpghttp://www.masrawy.com/Ketabat/Images/25-5-2010-4-0-23677.jpg
 نسبة الكولسترول ، كما ستعمل على الحيلولة دون الإصابة بحصى الكلى وأذابه حصى الكلى  ، وكذلك يقلل من مخاطر الإصابة بسرطان القولون. ثمار البطيخ :  أفضل  وأروع فاكهه  تقضي على العطش. تتألف من 92 ٪ منالمياه ، كما أنها محملة
http://www.aawsat.com/2005/09/22/images/health.324589.jpg
 بجرعة عملاقة من الجلوتاثيون(نوع من الأحماض الامينية ) ، والتي تساعد على تعزيز جهاز المناعة لدينا. كما أنها تشكل مصدرا رئيسيا للالليكوبين – مكافح عامل أكسده  السرطان. كما يحتوي على  فيتامين (C) و للبوتاسيوم. الجوافة والبابايا : تستحقان أفضل الجوائز لاحتوائهما على اعلي نسبه من فيتامين  (C) و الجوافة غنية أيضا
https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj1Zenkv2p6YuAFvFwx3LpnRlfCqdUDcut_JzVFGrhjQ5FhVuHdLZSBtJhX6tSKNxnu3PBo83xRjTjh9lFPwRNptvcLZ3b1h_k80Vq5eWv2qhGJhnF28MCQMVnwTztExA7EbhrGfl1q2BUu/s400/f-guava.jpg http://the-herb-store.com/catalog/images/papaya-fruit-bsp.jpg
بالألياف ، مما يساعد على منع الإمساك. البابايا غنية بالكاروتين ، وهذا جيد لعينيك.




شرب الماء البارد بعد تناول الوجبة يعني السرطان!
http://www.hoax-slayer.com/images/cold-water.jpghttp://www.re7an.net/vb/imgcachere7an/4981.re7an
هل  يمكنك تصديق هذا؟ بالنسبة لأولئك  الذين يحبون شرب الماء البارد ، هذا المقال مناسب  لهم  . وسيكون لطيفا  تناول قدحا من المشروب البارد بعد الوجبة الغذائية. ومع ذلك ، فإن الماء البارد  سوف يعمل على  تجميد  المادة الزيتية التي استهلكتها توا. و سيبطئ عملية الهضم. وعندما   يتفاعل هذا الراسب مع الحامض ، فسوف يتكسر وتمتصه الأمعاء أسرع من الطعام الصلب. وسوف يبطن الأمعاء. وسريعا  ، يتحول إلى دهون  التي ستودي إلى السرطان. فمن الأفضل شرب شوربة ساخنة أو ماء دافئ بعد وجبة طعام. ملاحظة مهمة وجدية حول  نمط النوبات القلبية ': (هذه ليست مزحة!)
على النساء أن يعلموا أن الألم الذي نشعر به  في الذراع الأيسر والمعروف كعرض من أعراض الأزمة القلبية.  ليس هو الوحيد بل يجب الانتباه للألم  الحاد في خط الفك السفلي فهو عمن أهم أعراض النوبة القلبية ذلك انك قد لا تشعر أبدا  بألم الصدر أثناء أول  نوبة قلبية. الغثيان و العرق الشديد أيضا من الأعراض.. ستين في المائة من الأشخاص الذين يصابون بنوبة قلبية بينما هم نائمون لا يستيقظون. بينما يوقظك ألم الفك من نوم عميق.   لنكن حذرين . وبذلك تكون لدينا  فرص نجاة أفضل بإذن الله.
يقول أحد أطباء القلب لو أن كل من يحصل على هذا البريد يرسله إلى 10 شخصا ، فأننا سوف ننقذ حياة واحد على الأقل.
سلمكم الله من كل شر
آآآآآآآآآآآمين