Month: May 2012

unable to browse windows network with samba4

I use Fedora 17 on my work laptop and thus need to connect to windows share sometimes. After I upgraded to Fedora 17 some time, I was unable to browse the windows network. I would get all kind of errors and warnings and tried everything that I knew about Samba to fix the issue. Tried searching through all the forums to figure out what was wrong but nothing helped. And suddenly today I resolved it and guess how:

Samba4 packages still are not able to mount the windows shares.

So, the solution was simple, remove samba 4 and go back to samba 3 current version in the repos. That sounded easy, until I started doing it. There are lot of dependencies on the samba-client so unless you are ready to remove them all and add them again, it’s not going to be that easy. Finally I had to do it the old fashioned way, using rpm command rather that yum, and here is how I did it:

rpm -e --nodeps samba4*
sudo yum install samba*

Since, I wanted all the samba4 packages to go away so removed them all at one go and then added the samba packages with yum :).

Enhanced by Zemanta

Upgrade to Fedora 17 from 16.

As usual time in couple of days to upgrade to Fedora 17. Release schedule is for 05/22 and so its just around the corner. So, if you are looking at upgrading using yum, then make sure that you visit this page.

There are some changes in latest version that will not allow you to upgrade without executing few commands manually and that page lists them. And if you are too brave and just want the steps and the command then here it is:

# sudo yum update dracut
# dracut --force --add convertfs
Change the following kernel commandline parameter directly in the bootloader menu, which is sh:own during bootup, or edit the line in /etc/grub*.cfg to remove ro and rhgb and append rw rd.convertfs enforcing=0
# revert after reboot.
# dmesg | grep dracut
# yum --releasever=17 update rpm
# rm -f /var/lib/rpm/__*
# rpm --rebuilddb
# yum --releasever=17 --disableplugin=presto --skip-broken distro-sync
# fixfiles onboot
Enhanced by Zemanta

Array of all possible colors in bash script

Sometime back, we had looked at using colors in bash script and here is a way to create a array of all the colors.

#!/bin/bash - 
#          FILE:
#         USAGE:  ./ 
#       OPTIONS:  ---
#          BUGS:  ---
#         NOTES:  ---
#        AUTHOR: Amit Agarwal (aka),
#       COMPANY: Roamware India Pvt Ltd
#       CREATED: 16/04/12 17:24:09 IST
# Last modified: Mon Apr 16, 2012  05:39PM
#      REVISION:  ---
for i in 40m 41m 42m 43m 44m 45m 46m 47m
    for l in 0 1
        echo -n "l=$l "
        for k in 0 1
            # echo -n "k=$k "
            for j in {30..37}
                echo -ne "${carr[$count]}$count \033[00m"

You can add this script to any script of your choice and you have all the 256 colors available to you in the script without additional coding. Happy coding.

Enhanced by Zemanta