Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Thursday, March 25, 2010

yum problems


upgrading after a while I encountered these problems:

[...]
Trying other mirror.
http://ftp.crc.dk/fedora/linux/releases/12/Everything/x86_64/os/Packages/privoxy-3.0.13-beta.1.fc12.1.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
http://fedora.uni-oldenburg.de/releases/12/Everything/x86_64/os/Packages/privoxy-3.0.13-beta.1.fc12.1.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - ""
Trying other mirror.
ftp://ftp.pbone.net/pub/fedora/linux/releases/12/Everything/x86_64/os/Packages/privoxy-3.0.13-beta.1.fc12.1.x86_64.rpm: [Errno 14] PYCURL ERROR 6 - ""
[...]


these 2 commands solved my night:

# yum clean all

# yum check-update

Monday, January 04, 2010

spamassassin 2010 bug


I understand it's a pretty stable program,
but this error is really gross!

https://secure.grepular.com/blog/index.php/2010/01/01/spamassassin-2010-bug/

changed local.cf and added:

score FH_DATE_PAST_20XX 0.0

Tuesday, December 09, 2008

install LAMP (Apache - mysql - php) on Ubuntu

sudo apt-get install apache2

sudo apt-get install php5

sudo apt-get install mysql-server-5.0

sudo apt-get install libapache2-mod-php5

sudo /etc/init.d/apache2 restart

Tuesday, September 25, 2007

Upgrade FC from 6 to 7

I've recently (tonight) upgraded my laptop from Fedora Core 6 to Fedora 7.
I've a pretty complete installation of Fedora and everything worked almost perfectly during installation...

The procedure I used is:

  1. Double check /etc/fstab for any /dev/hdX reference
  2. # yum update
  3. # yum clean all
  4. # rpm -Uhv http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/i386/os/Fedora/fedora-release-7-3.noarch.rpm http://download.fedora.redhat.com/pub/fedora/linux/releases/7/Fedora/i386/os/Fedora/fedora-release-notes-7.0.0-1.noarch.rpm
  5. # yum -y upgrade

I had some problems, well: minor problems that could stop an [unexperienced|lazy] linux user.

1. /etc/fstab
We could talk about the reliability of linux installations, but I won't. The upgrade from 6 to 7 could bring some annoying problems regarding devices... some devices changed since a driver in the kernel had upgraded, the result is that devices called: /dev/hdX are now called /dev/sdX. For this reason you should check your /etc/fstab for devices. I had only LVM devices and correctly labeled other devices, so this warning didn't touch me. But if a # grep hd /etc/fstab produces something to you, well, label records to something appropriate or upgrade will lock your box for a while.

4. rpm upgrade repos
remember to check YOUR system code:
PPC, x86_64 or i386
you really DON'T want to install some packages compiled on different architectures

5. yum -y upgrade
You could encounter some problems here, during the dependencies check... I'm very happy about the repository package system on linux boxes, dependencies are very well managed and getting an error here doesn't mean that linux is something wrong, it's simply double checking everything to make sure that everything will work correctly... I had some unresolved dependencies, due to the fact that I installed some extra packages to get some chess engines work on my laptop... to get out from this stale I decided to remove every package named...

the instruction:

# rpm -e python-cheetah python-setuptools PyOpenGL TurboGears python-turbocheetah pygtkglext glchess python-paste-script

resolved any dependency problem.

So I run again:
# yum -y upgrade 

from the command prompt (outside the window manager, BTW), after some time
and 1gb of packages downloaded, my system was upgraded.

Post installation:
Some package have still the fc6 code in their name, on this laptop are:

# rpm -qa | grep -c fc6
55

but a note on redhat.com assures this is perfectly normal for packages that didn't need a rebuild.

Wednesday, September 12, 2007

ext3_abort

on a linux machine I was experiencing this error

hdc: task_in_intr: status=0x59 { DriveReady SeekComplete DataRequest Error }
hdc: task_in_intr: error=0x40 { UncorrectableError }, LBAsect=155768546, sector=155768546
ide: failed opcode was: unknown
end_request: I/O error, dev hdc, sector 155768546

Seems definitely an hardware error, but I've some reasonable doubts about drivers.

...but then, after some trivial operations on computer, this error appeared, locking the system drive "ro" and causing many errors operationals errors:

EXT3-fs error (device dm-0): ext3_find_entry: reading directory #19432083 offset 0
Aborting journal on device dm-0.
journal commit I/O error
ext3_abort called.
EXT3-fs error (device dm-0): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
ext3_abort called.

a reboot solved, almost temporary the problem...

Monday, March 12, 2007

FC6 installation on Ext USB... Error 15

after insalling FC6 from a DVD on an external drive (USB)
I encountered the following problem.

Grub Loading Stage1.5.

grub Loading, please wait...
Error 15

freezing the boot...


after trying a
mkinitrd --preload=ehci-hcd --preload=usb-storage --preload=scsi_mod
--preload=sd_mod /boot/myinitrd.XX.YY.img

after editing via rescue /etc/grub.conf
and switching harddrives

disabling splashimage

commenting out hiddenmenu

_none_ of these solved anything...

Finally, I made thru linux rescue

grub-install --recheck /dev/sdb

AND

switching hd1 with hd0

and everything started to work

Friday, March 09, 2007

Don't use nslookup

http://homepages.tesco.net./~J.deBoynePollard/FGA/nslookup-flaws.html

Thursday, January 04, 2007

realkill


carino questo script in perl
un accanimento terapeutico...


for my $signal (qw{TERM INT HUP KILL}) {
last if kill $signal, $pid;
warn "warning: kill failed: pid=$pid, signal=$signal\n";
sleep 1;
}

Monday, December 19, 2005

samba 3 - getlocalsid

  1. Change the name of your server back to what it was in the smb.conf file and restart Samba.
  2. Use the new net getlocalsid [NAME] and net setlocalsid S-1-5-21-x-y-z commands to change the SID of your Samba server back to what it used to be.

    For example, if samba1 is the old NetBIOS name of your PDC, you can retrieve its SID with the following command, as the SID is still available:

         net getlocalsid samba1
    SID for domain samba1 is: S-1-5-21-3349071909-1695333706-3939217754

    Then you can set your SID correctly with:

         net setlocalsid S-1-5-21-3349071909-1695333706-3939217754

    Of course, a quick way to achieve all that is:

         net setlocalsid ‘net getlocalsid samba1 | cut -f2 -d:‘

    These commands are only available in Samba-3.0alpha20 and beyond.

  3. When Samba 2.2.8 ships, you should also be able to recover your previous SID and replace the existing one with the old one. You do this with the commands smbpasswd -X and smbpasswd -W
  4. Change the name of your server back to what it was in the smb.conf file and restart Samba.
  5. Use the new net getlocalsid [NAME] and net setlocalsid S-1-5-21-x-y-z commands to change the SID of your Samba server back to what it used to be.

    For example, if samba1 is the old NetBIOS name of your PDC, you can retrieve its SID with the following command, as the SID is still available:

         net getlocalsid samba1
    SID for domain samba1 is: S-1-5-21-3349071909-1695333706-3939217754

    Then you can set your SID correctly with:

         net setlocalsid S-1-5-21-3349071909-1695333706-3939217754

    Of course, a quick way to achieve all that is:

         net setlocalsid ‘net getlocalsid samba1 | cut -f2 -d:‘

    These commands are only available in Samba-3.0alpha20 and beyond.

  6. When Samba 2.2.8 ships, you should also be able to recover your previous SID and replace the existing one with the old one. You do this with the commands smbpasswd -X and smbpasswd -W

    For example, if samba1 is the old NetBIOS name of your Samba 2.2.8 server, you can retrieve its SID with:

          smbpasswd -X samba1
    SID for domain samba1 is: S-1-5-21-3349071909-1695333706-3939217754

    And you can change the SID of your server with:

          smbpasswd -W S-1-5-21-3349071909-1695333706-3939217754

It turns out that Samba still has the SID in its secrets.tdb file. If you can't remember your server's old name, you can most likely figure it out with the aid of tdbdump.

Firstly, you will need to build tdbdump. You can do this from the Samba source tree:

     cd tdb
make tdbdump

Then you simply dump your secrets file with tdbdump. The following shows an example.

   ./tdb/tdbdump /usr/local/samba/private/secrets.tdb
{
key = "SECRETS/SID/CRAPTESTER"
data = "\01\04\00\00\00\00\00\05\15\00\00\00\0D\949?\A6Z\8A\7F\C88\B2\88
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
}
{
key = "SECRETS/SID/INTRESTING"
data = "\01\04\00\00\00\00\00\05\15\00\00\00|\0Ex\04v\E8\F5\19\0Ag,\FF\00
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00
\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00\00"
}

You might find your data formatted a little differently to that above.

In anycase, you can see the server names that are likely to have been used. They are the last component of the keys starting with SECRETS.

You should note that there will be one entry in your secrets.tdb file of the form SECRETS/SID/ for your domain SID, and one entry of the form SECRETS/SID/ for your server SID. They should be the same.



Friday, December 16, 2005

diff smb.conf working & not

[root@linux samba]# diff smb.conf ../samba.3/smb.conf
9a10
> netbios aliases = AMBITER2006
11,12c12
< #auth methods = guest, sam, winbind
< passdb backend = tdbsam
---
> auth methods = guest, sam, winbind
16d15
< log level = 2
18c17
< socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192
---
> socket options = TCP_NODELAY SO_RCVBUF=8192 SO_SNDBUF=8192
25,26c24,25
< # add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u$
< # logon script = netlogon.bat
---
> add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u$
> logon script = netlogon.bat
29,33c28
< security = user
< encrypt passwords = yes
< domain logons = yes
< os level = 7
< hosts allow = 127.0.0.1 10.0.0.0/255.255.255.0
---
> os level = 64
35c30
< domain master = No
---
> domain master = Yes

Samba PDC

Migration

Chapter 7. Adding Domain Member Servers and Clients


[global]
workgroup = AMBITER2005
realm = LINUX.AMBITER2005.LOCALE
netbios name = AMBITER2005
server string = Samba Version %v
#auth methods = guest, sam, winbind
passwd program = /usr/bin/passwd %u
unix password sync = Yes
log file = /var/log/samba/%m.log
log level = 2
max log size = 50
socket options = TCP_NODELAY IPTOS_LOWDELAY SO_RCVBUF=8192 SO_SNDBUF=8192
printcap name = /etc/printcap
add user script = /usr/sbin/useradd -m %u
delete user script = /usr/sbin/userdel -r %u
add group script = /usr/sbin/groupadd %g
delete group script = /usr/sbin/groupdel %g
add user to group script = /usr/sbin/usermod -G %g %u
# add machine script = /usr/sbin/adduser -n -g machines -c Machine -d /dev/null -s /bin/false %u$
# logon script = netlogon.bat
logon drive = h:
logon home = \\%N\%U\.profile
security = user
encrypr passwords = yes
domain logons = yes
os level = 64
host allow = 127.0.0.1 10.0.0.0/255.255.255.0
preferred master = Yes
domain master = Yes
wins support = Yes
ldap ssl = no
idmap uid = 16777216-33554431
idmap gid = 16777216-33554431
cups options = raw

Tuesday, December 13, 2005

Samba 3

http://openskills.info/infobox.php?IDbox=552