Archive for February, 2008

Linux (Centos) Adding password by updating /etc/passwd

Probably better to use the admin tools or adduser, however

Process, backup 2 files: /etc/passwd and /etc/shadow
(Shadowing has been enabled by default since last century)
Add user to /etc/passwd
rm /etc/shadow
mkdir home for new user (and set owner/group)
execute /usr/sbin/pwconv
passwd newuser
do same for groups

Leave a Comment

Compiling Python problem and solution, Centos 5, Python 2.5.1

Trying to install an alternate copy of python than that which ships with Centos5 (Why do these package installers not rpm or yum the latest version?? Please can someone tell me!).

The first is to run ./configure

Then if you run make it will break with make: *** [libinstall] Error 1
The solution then is to edit ./Modules/Setup.dist and comment out line 180
rerun with make altinstall to not make it the default.

Leave a Comment

Launching kde remotely

Normally I install and use cygwin-x. From the shell I “startx” and in the shell that opens I enter xhost +
If DISPLAY is properly exported with the correct IP of the client then this generally works for most systems (connecting to Solaris and AIX) but I could not get the Centos remote desktop up via startkde & to finish loading properly so I installed vncviewer on my desktop instead. I would like to know why the desktop hangs, if you are passing and you know then please share! The VNC works in both the browser and via the client app, providing a password is set in the vnc server “Remote Desktop” and a vnc server is started. Lots of info on the web and no point in rewriting.

It’s all pretty grotty stuff really.

Leave a Comment

Port opening in firewall (Linux\Centos). Helps to allow vnc to work

If you need to allow vnc or something through your linux firewall then consider either using the tool provided in the interface or edit

“/etc/sysconfig/system-config-securitylevel”

# Configuration file for system-config-securitylevel

–enabled
–port=22:tcp
–port=137:udp
–port=138:udp
–port=139:tcp
–port=445:tcp
–port=443:tcp
–port=23:tcp
–port=5800:tcp
–port=5801:tcp
–port=5900:tcp
–port=5901:tcp
–port=5902:tcp
–port=5903:tcp
–port=5904:tcp

Other ports to consider

8080 for generic tomcat

4848 for Sun Admin port

Comments (1)

Missing libraries, fixing with yum and rpm, trying to make Blender work.

Blender runs pretty well in a cygwin x-windows shell (so far anyway). Getting Blender to actually work on my generic Centos 5 install was excruciating.

To find out what is missing from a system that will prevent an application from running use ldd as in the following example for the blender executable
[root@styx blender-2.45-linux-glibc236-py24-i386]# ldd blender | grep “not found”
libopenal.so.0 => not found
libalut.so.0 => not found
libSDL-1.2.so.0 => not found

Then to install packages:

[root@styx blender-2.45-linux-glibc236-py24-i386]# yum install libSDL-1.2.so.0
Loading “installonlyn” plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for SDL to pack into transaction set.
SDL-1.2.10-8.el5.i386.rpm 100% |=========================| 12 kB 00:00
—> Package SDL.i386 0:1.2.10-8.el5 set to be updated
–> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
SDL i386 1.2.10-8.el5 base 233 k

Transaction Summary
=============================================================================
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 233 k
Is this ok [y/N]: y
Downloading Packages:
(1/1): SDL-1.2.10-8.el5.i 100% |=========================| 233 kB 00:00
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: SDL ######################### [1/1]

Installed: SDL.i386 0:1.2.10-8.el5
Complete!

Getting Blender working
The above mentioned package via, yum install libSDL-1.2.so.0
rpm -i /mnt/dante/everyone/openal-0.0.8-1.i586.rpm
rpm -i /mnt/dante/everyone/libalut-1.1.0-alt1.2.i586.rpm

Leave a Comment

Mounting Windows volumes in Linux (In this case Centos 5)

Assuming that samba is running
Assuming that Windows has no firewall blocking
Assuming that the folder on the Windows machine is already shared for all
Assuming the hostname of the windows server is served by a DNS or in /etc/hosts then the name can be used. (If not then use the ip)

So, where dante is the Windows host and styx is a Linux server.

[root@styx /]# mkdir /mnt/everyone
[root@styx /]# chmod -R 777 /mnt/everyone
[root@styx /]# mount //dante/everyone /mnt/everyone

To automatically mount the volume then it would be a good idea to add a line to /etc/fstab
At the end of the file (which I first made a temporary copy of)

//dante/everyone /mnt/dante/everyone cifs password=

Once saved then at the prompt, mount -a to reload the table and be able to access the mount.

Leave a Comment

Installing java 5 on centos5

This is java_ee_sdk-5_04-linux.bin

And the problem is

/root/Desktop/java_ee_sdk-5_04-linux.bin: error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

The binary is not on the machine.

The solution is

[root@localhost ~]# yum install compat-libstdc++*

And Bobs your Auntie

[root@localhost ~]# yum install compat-libstdc++*

Loading “installonlyn” plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for compat-libstdc++-33 to pack into transaction set.
compat-libstdc++-33-3.2.3 100% |=========================| 7.2 kB 00:00
—> Package compat-libstdc++-33.i386 0:3.2.3-61 set to be updated
—> Downloading header for compat-libstdc++-296 to pack into transaction set.
compat-libstdc++-296-2.96 100% |=========================| 3.4 kB 00:00
—> Package compat-libstdc++-296.i386 0:2.96-138 set to be updated
—> Downloading header for compat-libstdc++-33 to pack into transaction set.
compat-libstdc++-33-3.2.3 100% |=========================| 7.2 kB 00:00
—> Package compat-libstdc++-33.x86_64 0:3.2.3-61 set to be updated
–> Running transaction check

Dependencies Resolved

=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
compat-libstdc++-296 i386 2.96-138 base 90 k
compat-libstdc++-33 i386 3.2.3-61 base 232 k
compat-libstdc++-33 x86_64 3.2.3-61 base 227 k

Transaction Summary
=============================================================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 549 k
Is this ok [y/N]: y
Downloading Packages:
(1/3): compat-libstdc++-3 100% |=========================| 232 kB 00:01
(2/3): compat-libstdc++-2 100% |=========================| 90 kB 00:00
(3/3): compat-libstdc++-3 100% |=========================| 227 kB 00:01
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: compat-libstdc++-33 ######################### [1/3]
Installing: compat-libstdc++-33 ######################### [2/3]
Installing: compat-libstdc++-296 ######################### [3/3]

Installed: compat-libstdc++-296.i386 0:2.96-138 compat-libstdc++-33.i386 0:3.2.3-61 compat-libstdc++-33.x86_64 0:3.2.3-61
Complete!

And then it will install.

Comments (1)