
These linux howtos are provided from our experience of working with linux software and hardware. Please note that we generally only post a HOWTO here if we struggle with something and have to do vast amounts of work to find out howto do it, hence why we share it with you.
| Key: The following formatting is used in the howtos: | |
root@ubuntu # < command > |
Shell commands executed as root user - to login as root you need to be the admin user (ie the first user created when ubuntu installed) and type sudo - i followed by your own password. Logging in as root is very dangerous when not required as system changes can be made - please ensure you know what you are doing. |
user@ubuntu # < command > |
Shell commands executed by the logged in user |
text text old text text text |
Old text that needs to be changed |
text text new text text text |
New text that replaces the old text |
enter this text |
Type the text into the required field or location indicate |
Note: All howtos are provided as a guide, we are not responsible for any issues arising from the use of these guides.
The List
When the first boot screen comes up where you are asked to push enter or specify special options type:
linux vga=787
Then push enter to load the installer.
Submitted by: Tim Wiel [29 December 2005]
The incorrect coloring is caused by the color depth not set correctly. This is most likely caused by specifing in the special options when installing vga=771 as suggested by many websites - this only allows for 256 colors whereas the boot screen seems to be richer than that in color.
To correct this incorrect coloring you need to edit your GRUB bootloader menu list.
root@ubuntu # vim /boot/grub/menu.lst
You need to replace the line (or line similar with kernal options) and save:
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single vga=771 noapic To this:
kernel /boot/vmlinuz-2.6.10-5-386 root=/dev/hda2 ro single vga=787 noapic Submitted by: Tim Wiel [29 December 2005]
I searched for ages on the net for how to do this but found manycomplicated solutions using mySQL and other mail packages I had neverheard of until I stumbled upon a set of simple instructions for settingup Spam Assassin with just postfix and procmail.
I am assuming you have postfix up and running already...
1. First install spamassassin using apt (you may have already done this if so skip a bit brother)
root@ubuntu # apt-get install spamassassin
You need to ensure that spamassassin is enabled:
root@ubuntu # vim /etc/default/spamassassin
Change the following lines from:
# Change to one to enable spamd
ENABLED=0
To this:
# Change to one to enable spamd
ENABLED=1
Then add spamassassin to start on startup (it may already be there):
root@ubuntu # update-rc.d -n spamassassin defaults
2. Set the Postfix delivery command to procmail (it may already be set):
root@ubuntu # vim /etc/postfix/main.cf
Change the following line:
MAILBOX_COMMAND=/usr/bin/procmail -a "$EXTENTION"
3. Install the procmail run control script by creating a new file in vim:
root@ubuntu # vim /etc/procmailrc
And add the following two lines:
:0fw
| /usr/bin/spamc
4. Restart the postfix server:
root@ubuntu # /etc/init.d/postfix restart
And thats it - you may want to edit the spam assassin configuration file /etc/mail/spamassassin/local.cf - webmin is has a good module for doing this
Submitted by: Tim Wiel [03 March 2006]
Another thing I searched for ages on the net for how to do - all I could find was installing Webmin from source - which I did and didn't work properly - so here is how to do it from apt-get.
1. First install webmin using apt
root@ubuntu # apt-get install webmin
2.Webmin installs using the root user password - of course this doesn't exist in Ubuntu so you can't login to the newly installed webmin unless you do this:
root@ubuntu # /usr/share/webmin/changepass.pl /etc/webmin root yourownpassword
Of course you need to change yourownpassword to your own password
Submitted by: Tim Wiel [10 March 2006]
After trying this three times I finally conquered it!!!!
I am assuming you have postfix up and running already...
1. First install spamassassin and procmail using apt:
root@ubuntu # apt-get install spamassassin
You need to ensure that spamassassin is enabled:
root@ubuntu # vim /etc/default/spamassassin
Change the following lines from:
# Change to one to enable spamd
ENABLED=0
To this:
# Change to one to enable spamd
ENABLED=1
Then add spamassassin to start on startup (it may already be there):
root@ubuntu # update-rc.d -n spamassassin defaults
2. Set the Postfix delivery command to procmail (it may already be set):
root@ubuntu # vim /etc/postfix/main.cf
Change the following line:
MAILBOX_COMMAND=/usr/bin/procmail -a "$EXTENTION"
3. Install Amavisd-new and some library files needed by AVG using apt:
root@ubuntu # apt-get install amavisd-new libstdc++2.10-glibc2.2 expat
4. Configure the amavisd-new configuration using vim:
root@ubuntu # vim /etc/amavis/amavisd.conf
Change the following lines:
$mydomain = '<yourservername>';
@local_domains_acl = qw( ".$mydomain" ); # you may want to use qw() to check all in and out
$final_virus_destiny = D_DISCARD; # (defaults to D_BOUNCE)
$final_banned_destiny = D_REJECT; # (defaults to D_BOUNCE)
$final_spam_destiny = D_PASS; # (defaults to D_REJECT)
$spam_admin = "postmaster\@$mydomain";
$spam_lovers{lc("postmaster\@$mydomain")} = 1;
$virus_admin = "postmaster\@$mydomain";
$QUARANTINEDIR = undef;
$virus_quarantine_to = undef;
$remove_existing_spam_headers = 0;
$sa_local_tests_only = 0; # (default: false)
$SYSLOG_LEVEL = 'mail.info';
$log_level = 2;
Uncomment these lines:
$forward_method = 'smtp:127.0.0.1:10025'; # where to forward checked mail
$notify_method = $forward_method; # where to submit notifications
$sa_tag_level_deflt = -999; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 999; # triggers spam evasive actions
Comment out these lines:
#@bypass_spam_checks_acl = qw( . );
#$spam_quarantine_to = 'spam-quarantine';
5. Create the /var/log/amavis.log and change ownership to the amavis user:
root@ubuntu # touch /var/log/amavis.log
root@ubuntu # chown amavis:amavis /var/log/amavis.log
6. Edit the amavisd.conf file again and comment our all the antivirusmodules except the avg one therefore making the configuration for theantivirus section be:
@av_scanners = (
# ### http://www.grisoft.com/
['AVG Anti-Virus',
\&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
qr/^200/, qr/^403/, qr/^403 .*?: (.+)/ ]
);
@av_scanners_backup = (
);
7. Add the following to the end of the master.cf using vim:
root@ubuntu # vim /etc/postfix/master.conf
smtp-amavis unix - - n - 2 smtp
-o smtp_data_done_timeout=1200
-o disable_dns_lookups=yes
127.0.0.1:10025 inet n - n - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
It is very important to having the -o lines indented from the margin by a couple of spaces or a tab otherwise it will not work
9. Install the avg antivirus using the install.sh script in the un tarred installation file:
root@ubuntu # ./install.sh
root@ubuntu # /etc/init.d/avgd start
10. Add the content filter to the postfix configuration and restart postfix:
root@ubuntu # postconf -e content_filter="smtp-amavis:[127.0.0.1]:10024"
root@ubuntu # /etc/init.d/postfix restart
Everythingshould work fine now - I hope I have not missed out anything. Pleasefeel free to contact me nospam.timw@bcsystems.co.nz (removing thenospam)
Submitted by: Tim Wiel [17 March 2006]
I was having problems with Thunderbird 1.0.2 on Breezy not opening compose windows when clicking on reply and forward and such like.
To correct this I decided to install Thunderbird 1.5 - its the lateststable release so why not have it installed. First I removed usingsynaptic the old install of thunderbird. And installed the new one fromsource - however I realised that the install was a 32bit and was notgoing to run on my 64bit laptop. I got a whole lot of pango errors. So heres what I did to make it work.
First I made sure that the programs needed to run the 32bit program were installed using apt-get.
user@ubuntu # sudo apt-get install ia32-libs ia32-libs-gtk linux32
Next I downloaded the Thunderbird 32bit install using wget
user@ubuntu # wgethttp://ftp.mozilla.org/pub/mozilla.org/thunderbird/releases/1.5.0.2/linux-i686/en-GB/thunderbird-1.5.0.2.tar.gz
This was easy - next I extracted it
user@ubuntu # sudo tar -C /opt -x -z -v -f thunderbird-1.5.0.2.tar.gz
Next I created a file using vim in the install directory
user@ubuntu # sudo vim /etc/pango32/pangorc
And pasted the following text into it
[Pango]
ModuleFiles=/etc/pango32/pango.modules
[PangoX]
AliasFiles=/etc/pango/pangox.aliases
Then I created another file as a bashscript to run thunderbird using the pango conf I just created
user@ubuntu # sudo vim /usr/bin/thunderbird32
And pasted the following text into it
#!/bin/sh
export GTK_PATH=/usr/lib32/gtk-2.0
export PANGO_RC_FILE=/etc/pango32/pangorc
linux32 /opt/thunderbird/thunderbird $@ Next I changed the file to executable so you can run thunderbird
user@ubuntu # sudo chmod -x /usr/bin/thunderbird32
Before running thunderbird transfer you profile to the new location needed by thunderbird 1.5
user@ubuntu # cd
user@ubuntu # cp -r .mozilla-thunderbird .thunderbird
Now you can run thunderbird by running the command, you can also add a menu command to the gnome menu by adding the command thunderbird32
user@ubuntu # thunderbird32
This Howto was based on the following wiki entries - https://wiki.ubuntu.com/ThunderbirdNewVersion and https://wiki.ubuntu.com/FirefoxAMD64FlashJava
Submitted by: Tim Wiel [01 May 2006]
It took me hours and hours to get this simple content filter to work.
Basically Spam assassin marks it as spam then procmail filters it into a spam mailbox file in the users home directory. This is symlinked to the /var/mail directory so it can still be accessed by mail programs.
I am assuming you have postfix + spamassassin + procmail up and running already with spamassassin adding SPAM headers to the mail through procmail...
1. Open the /etc/procmailrc file using vim:
root@fedoraC3 # vim /etc/procmailrc
Add the following lines (I have included the spam assassin filter also for clarity):
#procmailrc file for spam filtering into seperate mailboxes
#
# Set up procmail variables and setup procmail logging
SHELL=/bin/sh
PATH=${HOME}/bin:/usr/bin:/bin
MAILDIR=${HOME}/mail
LOGFILE=${HOME}/.procmail/procmail.log
VERBOSE=yes
LOGABSTRACT=all
LOCKFILE=${HOME}/.procmail/lock
# First content filter creates the folders and spam folders for the users - this will run everytime a mail comes through just to make sure
:0w
| /bin/mkdir -p ${HOME}/.procmail && /bin/touch ${HOME}/spam
# Second filter forwards the mail to spam assassin to add headers to
:0fw
| /usr/bin/spamc
# Third filter does the spam moving based on the X-SPAM-Status header added by spam assassin
:0:
* ^X-Spam-Status: Yes
${HOME}/spam
Save the file and restart postfix:
root@fedoraC3 # service postfix restart
2. Set up symlinks for all the users in the mail directory - you need to do this by hand for each user - it creates spam.<USERNAME> mailboxes for each mail user:
root@fedoraC3 # ln -s /home/<USERNAME>/spam /var/log/spam.<USERNAME>
Once you have done this for each user then change the ownership of just the links
root@ubuntu # chown -h mail:mail /var/mail/spam.*
Submitted by: Tim Wiel [08 May 2006]
|
Setting up a NIS system so that all the pcs in the house running Linux can be consistant
To setup NIS, you need to setup NIS server(master) first, then the NIS client for every Ubuntu machines.
The NIS is not on Ubuntu CD, you need to download via Synaptic, which is the software search/download tool on Ubuntu. Then follow some instruction provided by Ubuntu to setup the NIS client. For setup NIS server on Ubuntu, 1. make sure all the accounts have created on the NIS server (/etc/passwd, /etc/shadow, /etc/group) 2. Make sure in /etc/hosts have the following line 127.0.0.1 localhost 3. Initialize NIS sudo apt-get install portmap nis 4. Edit “/etc/default/portmap” ARGS=”-i 127.0.0.1” 5. Edit “/etc/default/nis” NISSERVER = master 6. Edit “/etc/yp.conf” domain domainname server <servername> <=== The NIS server name 7. Edit "/var/yp/Makefile”, make sure "PWDIR=/etc" or the place you put the password file 8. Run the following commands: sudo /usr/lib/yp/ypinit -m sudo /etc/init.d/portmap restart sudo /etc/init.d/nis restart sudo make -C /var/yp For Ubuntu NIS client: 1. Edit "/etc/hosts" and add <IP address of NIS server> <NIS server name> If you don't setup DNS or in case DNS is not working 2. sudo apt-get install portmap nis 3. Edit “/etc/hosts.allow” portmap : “Server NFS” “address IP" where NFS server is the students' home directory server. 4. Edit /etc/passwd and add +:::::: 5. Edit /etc/group and add +::: 6. Edit /etc/shadow and add +:::::::: 7. Edit /etc/nsswitch.conf to make sure hosts: files dns nis 8. Edit /etc/yp.conf domain domainname server <NIS servername> 9. sudo /etc/init.d/nis restart For more details, you can check the following URLs: NIS how-to: http://tldp.org/HOWTO/NIS-HOWTO/index.html |
||
|
For any changes you make to the passwd or group or shadow files you need to run sudo make -C /var/yp
Here is another URL:
http://homes.esat.kuleuven.be/~decockd/wiki/bin/view.cgi/Main/ConfiguringNetworkInformationSystemTOC |
Entered by: Barry Clearwater [August 2006]
Not so much a howto as a config file.
The Hauppauge grey remote that came with the WINTV PVR350 as sold in New Zealand needed a couple of tweaks to get all the buttons to work with the lirc. Following is the lircrc file that belongs in .mythtv
# ~/.mythtv/lircrc
#
# MythTV native LIRC config file for
# the new grey Hauppauge remote
#
# Jarod Wilson, Jeff Campbell, Brad Templeton
# Adjustments by Barry Clearwater
# Here we have the jump point commands. They only work if you have
# defined function keys for these jump points. For me the most
# common command is the menu of recordings, so I put that on "videos"
# even though that's counter-intuitive
begin
prog = mythtv
button = TV
repeat = 3
config = F5
end
begin
prog = mythtv
button = Videos
repeat = 3
config = F2
end
# Not yet defined
begin
prog = mythtv
button = Music
repeat = 3
config = Up
end
# Given another function for now, I don't use mythgallery
begin
prog = mythtv
button = Pictures
repeat = 3
config = F
end
begin
prog = mythtv
button = Guide
repeat = 3
config = F3
end
# I stuck the "todo" list on here as Myth has no radio function
begin
prog = mythtv
button = Radio
repeat = 3
config = F4
end
begin
prog = mythtv
button = UP
repeat = 3
config = Up
end
begin
prog = mythtv
button = DOWN
repeat = 3
config = Down
end
begin
prog = mythtv
button = LEFT
repeat = 3
config = Left
end
begin
prog = mythtv
button = RIGHT
repeat = 3
config = Right
end
# Channel Up
begin
prog = mythtv
button = Ch+
repeat = 3
config = Up
end
# Channel Down
begin
prog = mythtv
button = Ch-
repeat = 3
config = Down
end
# OK/Select
begin
prog = mythtv
button = Ok
config = Space
end
# Play
begin
prog = mythtv
button = Play
config = Return
end
# Stop
begin
prog = mythtv
button = Stop
config = I
end
# Escape/Exit/Back
begin
prog = mythtv
button = Back/Exit
config = Esc
end
# Power Off/Exit
begin
prog = mythtv
button = Power
config = Esc
end
# Pause
begin
prog = mythtv
button = Pause
repeat = 3
config = P
end
# Mute
begin
prog = mythtv
button = Mute
repeat = 3
config = |
end
# Fast forward (30 sec default)
begin
prog = mythtv
button = Rewind
repeat = 3
config = <
end
# Rewind (10 sec default)
begin
prog = mythtv
button = Forward
repeat = 3
config = >
end
# Skip forward (10 min default)
begin
prog = mythtv
button = Next
repeat = 3
config = End
end
# Skip backward (10 min default)
begin
prog = mythtv
button = Previous
repeat = 3
config = Home
end
# Record
begin
prog = mythtv
button = Record
repeat = 3
config = R
end
# Delete
begin
prog = mythtv
button = Red
repeat = 3
config = D
end
# Decrease play speed
begin
prog = mythtv
button = Green
repeat = 3
config = J
end
# Display EPG while in live TV,
# View selected show while in EPG
begin
prog = mythtv
button = Menu/i
repeat = 3
config = M
end
# Scroll up
begin
prog = mythtv
button = Vol+
repeat = 3
config = F11
end
# Scroll down
begin
prog = mythtv
button = Vol-
repeat = 3
config = F10
end
# Bring up OSD info
begin
prog = mythtv
button = Go
repeat = 3
config = I
end
# Change display aspect ratio
begin
prog = mythtv
button = Prev.Ch
repeat = 3
config = W
end
# double speed watch
begin
prog = mythtv
button = Yellow
repeat = 3
config = J
end
# change tuners
begin
prog = mythtv
button = #
repeat = 3
config = Y
end
# Bring up Time stretch
begin
prog = mythtv
button = Blue
repeat = 3
config = A
end
# Numbers 0-9
begin
prog = mythtv
button = 0
repeat = 3
config = 0
end
begin
prog = mythtv
button = 1
repeat = 3
config = 1
end
begin
prog = mythtv
button = 2
repeat = 3
config = 2
end
begin
prog = mythtv
button = 3
repeat = 3
config = 3
end
begin
prog = mythtv
button = 4
repeat = 3
config = 4
end
begin
prog = mythtv
button = 5
repeat = 3
config = 5
end
begin
prog = mythtv
button = 6
repeat = 3
config = 6
end
begin
prog = mythtv
button = 7
repeat = 3
config = 7
end
begin
prog = mythtv
button = 8
repeat = 3
config = 8
end
begin
prog = mythtv
button = 9
repeat = 3
config = 9
end
### MPlayer lirc setup
# Show OSD
begin
prog = mplayer
button = MENU
repeat = 3
config = osd
end
# Pause playback
begin
prog = mplayer
button = PAUSE
repeat = 3
config = pause
end
# Skip ahead a minute if playing
# If paused, resume playing
begin
prog = mplayer
button = PLAY
repeat = 3
config = seek +1
end
# Stop playback and exit
begin
prog = mplayer
button = STOP
repeat = 3
config = quit
end
# Mute
begin
prog = mplayer
button = MUTE
repeat = 3
config = mute
end
# Seek back 10 seconds
begin
prog = mplayer
button = Rewind
repeat = 3
config = seek -10
end
# Seek forward 30 seconds
begin
prog = mplayer
button = Forward
repeat = 3
config = seek +30
end
# Quit
begin
prog = mplayer
button = BACK/EXIT
repeat = 3
config = quit
end
# Seek forward 10 minutes
begin
prog = mplayer
button = SKIP
repeat = 3
config = seek +600
end
# Seek backward 10 minutes
begin
prog = mplayer
button = REPLAY/SkipBackward
repeat = 3
config = seek -600
end
# Toggle full-screen
begin
prog = mplayer
button = Prev.Ch
repeat = 3
config = vo_fullscreen
end
### Xine lirc setup
begin
prog = xine
button = PLAY
repeat = 3
config = Play
end
begin
prog = xine
button = STOP
repeat = 3
config = Stop
end
begin
prog = xine
button = OFF
repeat = 3
config = Quit
end
begin
prog = xine
button = PAUSE
repeat = 3
config = Pause
end
begin
prog = xine
button = CH+
repeat = 3
config = EventUp
end
begin
prog = xine
button = CH-
repeat = 3
config = EventDown
end
begin
prog = xine
button = VOL-
repeat = 3
config = EventLeft
end
begin
prog = xine
button = VOL+
repeat = 3
config = EventRight
end
begin
prog = xine
button = OK
repeat = 3
config = EventSelect
end
begin
prog = xine
button = BACK/EXIT
repeat = 3
config = Menu
end
begin
prog = xine
button = FFW
repeat = 3
#config = SpeedFaster
config = SeekRelative+60
end
begin
prog = xine
button = REW
repeat = 3
#config = SpeedSlower
config = SeekRelative-60
end
begin
prog = xine
button = FULL
repeat = 3
config = Volume+
end
begin
prog = xine
button = BLANK
repeat = 3
config = Volume-
end
begin
prog = xine
button = MUTE
repeat = 3
config = Mute
end
begin
prog = xine
button = MENU
repeat = 3
config = RootMenu
end
begin
prog = xine
button = SKIP
repeat = 3
config = EventNext
end
begin
prog = xine
button = REPLAY
repeat = 3
config = EventPrior
end
begin
prog = xine
button = GO
repeat = 3
config = OSDStreamInfos
end
begin
prog = xine
button = RED
repeat = 3
config = Quit
end
begin
prog = xine
button = RED
repeat = 3
config = Quit
end

