Windows,Android,Linux,Apple Mac,Iphone,Ipad,Tips and Tricks,tutorial for Problem.Repair,Recovery,data,Troubleshooting,Computer Help,Software,Tweak Computers,Guide to Windows,linux and software Install guide.MotherBoard repair,Hardware.GSM,Phone,Wireless,WIFI,Msn,Ubuntu.Blogger tips....
PackageKit
For more information on PackageKit
Commands to find out who are logged on
Tool 1: w - Show who is logged on and what they are doing
# w
Tool 2: who - Show who is logged on
# who
# who -q (All login name and count number of user logged on)
Tool 3: last - show listing of last logged in users
# last
Tool 4: uptime - Tell how long the system has been running
# uptime
Using Gnome Partition Editor (Gparted) to resize, move the partition Windows NTFS
I have used the Gparted to shrink my D drive, and expand the "C" Drive on a Windows 7. I was pleasantly surprised that after dhrinking my D drive, I can move "D" Drive to the "free space" and create "free" space on the right of the C Drive. And all this is done with simple clicked, drag and drop.
Indeed a wonderful tool for System Administration
NFS and "Permission Denied" Mount Problem at the Client
1. On the LINUX Client
# mount /nfs-server
mount: xxx.xxx.xxx.xxx:/nfs-server failed,
reason given by server: Permission denied
We have checked the permission on the nfs-server:/etc/exports and everything is correct. We did a:
# showmount -e nfs-server
Everything was correct too and seem correct. If we do a "rpcinfo -p", it also show correct information
program vers proto port
100000 2 tcp 111 portmapper
100000 2 udp 111 portmapper
100024 1 udp 615 status
100024 1 tcp 618 status
100021 1 udp 32771 nlockmgr
100021 3 udp 32771 nlockmgr
100021 4 udp 32771 nlockmgr
100021 1 tcp 37569 nlockmgr
100021 3 tcp 37569 nlockmgr
100021 4 tcp 37569 nlockmgr
On the Server side,
We check the /etc/exports and everything is correct. Next we restarted the NFS and the Portmap Services. But the Clients still show the "Permission Denied" Error
We noticed that the /proc/mounts/ did not have the NFS Information. To resolve this issues, we have to manually add NFS information inside the /proc/mounts
nfs-server:/home /home nfs rw,vers=3,rsize=8192,wsize=8192,hard,intr,proto=tcp,timeo=14,retrans=2,sec=sys,addr=n00 0 0
We did the NFS Mount and everything was working!
Related Articles:
Power Mangement for KDE and Gnome

Gnome Power Mangement is a essential tool for power mangement on notebook and desktop. It has interesting options such as
- To suspend your laptop when the lid is closed.
- Power History (my favourite)
- Display Brightness
- Actions taken when power buttons or suspend buttons is pressed
- And so much more.....
KDE Power Devil is a lightweight laptop power management system designed for KDE4 Environment. According to the site, with PowerDevil you can set up preferences for lid Closing, Brightness, CPU scaling, Idle time, both when connected to AC and when on Battery.
Good news! KDE Power Devil is now compiled with KDE Core Releases and no longer as an external application
Disabling Shutdown and Reboot in GNOME logout menu
1. Changing GNOME System Menu
Change the gdm's config file
# vim /etc/X11/gdm/gdm.conf
Find a line in the gdm.conf
# SystemMenu = false
2. To Prevent users from opening a termina and running "poweroff" or "reboot"
Delete or move these files:
/etc/security/console.apps/poweroff
/etc/security/console.apps/reboot
3. Prevent shutdown using Alt-Ctrl-Del
# vim inittab
# Trap CTRL-ALT-DELETE
ca::ctrlaltdel:/sbin/shutdown -t3 -r now
And change it to read:
# Disallow CTRL-ALT-DELETE
ca::ctrlaltdel:/bin/echo "ctrl-alt-delete has been disabled"
Modify the ownership
#sudo chgrp root /sbin/halt /sbin/shutdown
#sudo chmod 550 /sbin/halt /sbin/shutdown
Articles:
- Disable Shutdown For Normal Users (Ubuntu Blog)
- Disable shutdown/reboot in GNOME logout menu (Fedora Mailing List)
Centrify Express Express Tips and Tricks
- For Best Practise Video, see Centrify Express Tips and Tricks
- For the community site including forum see Centrify Express Community Site
dmidecode - Finding the hardware details remotely
Options includes:
- bios,
- system,
- baseboard,
- chassis,
- processor,
- memory,
- cache,
- connector,
- slot
To obtain the information, just type
# dmidecode --type system
To get specific information such as serial number which will be useful for remote fault-reporting without making a trip to the data-center:
# dmidecode -s system-serial-number
To get a list of string keywords:
# dmidecode -s
Followup Articles:
Fixing your system with FirstAidKit
- To install FirstAidKit
# yum install firstaidkit - To run the automated process of the recovery tool, run
# firstaidkit -a - To view a list of available plug-ins
# firstaidkit --list
Using id commands to display user and group information
# id your_userid
Tips on useradd and usermod commands
useradd and usermod are very often used utilities. They are several useful paramenters which we can use for the creation and maintenance of user accounts.
- -c (Comments and Descriptions of the account. Using quotation is necessary if you are using multiple words
- -d (home directory of the account. If -m is used, copy the home directory as well)
- -e (Assign a expiration date for the account in MM/DD/YYYY format)
- -f (Set the number of days after a password expires until the account is permanently disabled. The default option is -l which disable this option)
- -g (primary group that the account belongs to)
- -G (list of groups that user belongs to)
- -l (Change login name of the account to the name supplied after -l option)
- -u (Change the userid for the account)
Setting Quota on CentOS Linux
Step 1: At the /etc/fstab, add "usrquota, grpquota" to the partition you wish to put quota on
/dev/sdb1 /home ext3 defaults,usrquota,grpquota 1 1
Step 2: Initialise aquota.user
# touch /dev/sdb1/aquota.user
# chmod 600 /dev/sdb1/aquota.user
Step 3: Remount the partition
# mount -o remount /dev/sdb1
# less /etc/mtab
(It should show the list of file system having quota entry in Step 1)
Step 4: Do a Quotacheck commands and turn the quota on
#quotacheck -avugm /dev/sdb1
(The quotacheck command will do a scan and will take a while)
# quotaon -av
# quotatstats
(Check for statistics and possible error encountered)
Step 5: To edit a quota
# edquota -u user_id
(Edit the soft and hard limit respecitvely) or alternatively
# setquota -u user_id 100 200 0 0 -a /dev/sdb1
(where 100 and 200 are the block soft and hard limit respectively)
To quota summary report, do a repquota
# repoquota -a
Further Notes:
For more details readings,
- Implementing Disk Quotas on Linux (Souptonut.sourceforge.net)
- Linux File System Quotas (Yo Linux)
FileLight - Visualise Disk Usage on computer
I tried on CentOS 5.2. Just make sure you have RPMForge repository.
# yum install filelight
Similarly, The Debian Derivative should have this package. I tried on Linux Mint 6
# apt-get install filelight
Cool....
Creating Packages with CheckInstall
# ./configure
# ./make
#./make install
However, you may want use CheckInstall as it first build a package (*.rpm or *.deb) and then install them. It thus also has the benefit of uninstalling later. If you are using Redhat derivative, you should find the package build in /usr/src/redhat/RPMS/
So with Checkinstall, the install procedure will be
#./configure
#./make
#./check install
OR
# ./configure && make && checkinstall
Notes:
- CheckInstall Official Website
- Tutorial on CheckInstall "How to use Checkinstall on RedHat"
Backup Software - Back In Time
Currently there are two GUI available: Gnome and KDE 4 (>= 4.1).
All you have to do is configure:
- Where to save snapshot
- What directories to backup
- When backup should be done (manual, every hour, every day, every week, every month)
10 Essential Tricks for System Administrators
"The best systems adminsitrators are set apart by their efficiency.........."
- Trick 1: Unmounting the unresponsive DVD drive
- Trick 2: Getting your screen back when it's hosed
- Trick 3: Collaboration with screen
- Trick 4: Getting back the root password
- Trick 5: SSH back door
- Trick 6: Remote VNC session through an SSH tunnel
- Trick 7: Checking your bandwidth
- Trick 8: Command-line scripting and utilities
- Trick 9: Spying on the console
- Trick 10: Random system information collection
Wow......
Directory index forbidden by Options directive error for when displaying nagios
To resolve the problem above. Go to
# vim /etc/httpd/conf/httpd.conf
Type the following into http.conf and restart apache and nagios
# service htpd restart
# service nagios restart
Understanding Login Sequence
When a user login, the environment variables are set following the below order
- /etc/profile (for all users)
- /etc/profile.d (Application specific setup)
- ~/.bash_profile
- ~/.bashrc
For further information, read Login Sequence
Force users to change their passwords upon first login
Taken from Redhat Magazine: Tips and tricks: How do I force users to change their passwords upon first login?
- Firstly, lock the account to prevent the user from using the login until the change has been made:
# usermod -L - Change the password expiration date to 0 to ensure the user changes the password during the next login:
# chage -d 0 - To unlock the account after the change do the following:
# usermod -U
Analysing your DNS Traffic with dnstop
Firstly install from repository
# apt-get install dnstop
# dnstop -l 3
Once you are inside the dnstop, you can use the following sort-cut
- @ - Display the source of the query, domain target, volume and percentage of DNS Traffic
- # - Similar to @ but with third level domain name
For more information, see the Dnstop project site