Howto: Completely Transparent Shell on your Ubuntu desktop with Compiz Fusion

I will show how to create a conky'esque transparent shell using only gnome-terminal and Compiz-fusion. Check out the attached screenshots.



First create a new profile in gnome-terminal (Edit->Profiles->New), name it "trans". Set the following characteristics:

Cursor blinks: off
Show menubar: off
Initial title: trans
Dynamically-set title: Isn't displayed
Color scheme: Black on white
Transparent Background: on
Set the transparency down to "None"

The important part here is that now the gnome-terminal is gonna have the title trans. We can now target the gnome-terminal windows that are using trans profile from inside CompizConfig by using "title=trans".

Open CompizConfig (System->Preferences->CompizConfig). Make sure you have the regEx plugin enabled.

Go to the Window Decoration plugin and add "!title=trans" to the Decoration windows field. This will skip adding window borders to our trans terminals.
Go to the Window Rules plugin. Add "title=trans" to the following fields (This will turn the terminals into a widget-like windows):

  • Skip taskbar, Skip pager, Below, Sticky, Non resizable windows, Non minimizable windows, Non maximizable windows, Non closable windows
In the Fixed Size Windows section click add. Use "title=trans" for the the Sized Window field and put the height and width you want for your shells.

Go to the Place Windows plugin, go to the Windows with fixed positions tab, in Windows with fixed positions click add. Put "title=trans" in Positioned Windows field and put x and y coordinates of the default position you want for your shell (top-left corner is 0,0). After they have loaded you can move them by Alt-Dragging them.

To run the transparent gnome-terminal use:
Code:

gnome-terminal --window-with-profile=trans
Edit:
dock: avant-window-navigator
widgets: conky
conky theme: http://ubuntuforums.org/showpost.php...&postcount=505


Ubuntu Running Slow?

Get the performance patchset! here on this site

Expand full post here...

Comments

Howto: Install Samba quickly and Easily Via Custom Scripts on Ubuntu

I found these scripts based off of a web tutorial on how to install and configure a file server via samba that i found here. I don't take credit for the tutorial just for the scripts. Feel free to edit these scripts and make them better. Just be sure to post the new ones.

Installation:
1. extract the samba scripts.
2. run installsamba.sh
3. run addusers.sh for each user you want to add
4. run addshares.sh for each folder you want to add
5. enjoy your new file server

Also I would like to make more scripts for other common tasks in Ubuntu that other people seem too lazy to make scripts for. I don't mean to sound like I don't appreciate his or her work, I would just like to see more scripts for installing things like the alsa driver. Let me know if there are any that are desperately needed and I would do my best.
Download scripts here

Expand full post here...

Comments

Howto: Securely Delete Files In Ext3 Via Nautilus Menu

This adds a menu which securely deletes files by overwriting them 25 times

install nautilus-actions via synaptic package manager

launch nautilus actions configuration
-->system--->preferences--->nautilus actions configuration

Add

Label = Shred

Path = shred

Parameters = -fuz %M

Click ok and exit



in terminal type killall nautilus


Viola!

A note for ext3 users from the shred manual:
CAUTION:
Note that shred relies on a very important assumption: that
the file system overwrites data in place. This is the traditional way
to do things, but many modern file system designs do not satisfy this
assumption. The following are examples of file systems on which shred
is not effective, or is not guaranteed to be effective in all file sys‐
tem modes:


In the case of ext3 file systems, the above disclaimer applies only in data=journal mode, which journals file data in addition to just metadata. In both the data=ordered (default) and data=writeback modes, shred works as usual.

Expand full post here...

Comments

Howto: Free Encrypted Online Storage for Ubuntu

For quite a while now I was looking for a solution, to store a backup of my boot partition (ubuntu server) online, since it took me about half a year to get the system configured the way I wanted it. Loosing it would definitely cause an attempted genocide. But I had two major concerns:
1: The costs. Why would I have to pay for something, that is already available in different forms. Yeah, services like S3 from amazon are affordable, but, why pay when you don't have to, right?
2: Security. I'm aware of the fact that there is no such thing as total security when you're somehow connected to the interwebs, but I don't wanna trust some firm, where I can't hunt down the sysadmin with a baseball bat, because he got into my backup files. I think you get the point.

So here is what I did.

Create a backup with tar, split it into 94MB files, encrypt them with my gpg key and upload them to rapidshare. Rapidshare will delete the files after 3 month, if you haven't accessed them, which sould be quite enough.

Let's have a look at the full backup script:

Code:

#!/bin/bash
#create directory for this month full back in /home/saylar/backup/
mkdir /home/saylar/backup/`date '+%Y-%m'`
mkdir /home/saylar/backup/`date '+%Y-%m'`/full_backup/
#create a full backup for this month and split it into 94MB Files
tar cvj --listed-incremental /home/saylar/backup/`date '+%Y-%m'`/fullbackup.snar --exclude=/proc --exclude=/lost+found --exclude=/mnt --exclude=/sys --exclude=/home/saylar/backup / | split -d -b 90m - /home/saylar/backup/`date '+%Y-%m'`/full_backup/full_backup.tar.bz2.split
#encrypt the files with gpg
gpg --encrypt-files --batch --no-tty -r dummy@email.address /home/saylar/backup/`date '+%Y-%m'`/full_backup/*split*
#upload the files via rsupload script
for gpg in /home/saylar/backup/`date '+%Y-%m'`/full_backup/*gpg;
do /home/saylar/backup/rsupload.pl "$gpg";
done
#now move the file with Rapidsharelinks into corresponding directory
mv /home/saylar/backup/rsulres.txt /home/saylar/backup/`date '+%Y-%m'`/full_backup/
#delete gpg files after they were succesfully uploaded
rm -r /home/saylar/backup/`date '+%Y-%m'`/full_backup/*gpg

As you can see, it first creates a directory in /home/saylar/backup for this month and a full_backup directory. Then we tar the whole filesystem and pipe that into the split command which will split the files into 94MB files. Then we encrypt the split files with gpg. Note the --batch --tty option. This is neccessary because the script is started by cron, otherwise it won't run. Then we take upload script provided by rapidshare(Look for the news from 22. Dec. 2006) and upload the gpg files. Since the script does a MD5 check, there is no need to worry about corrupted files. Now we just have to move the file with the download links into the corresponding backup directory and remove the gpg files again. The scripts are running at 6am each day and at 11:30 pm each day we'll move the logfiles of what was done into the corresponding directory. Just to be sure, that the fullbackup is really finished.

So, if you wanna do that, you have to do the following things:
Code:

mkdir ~/backup
Code:

mkdir ~/backup/log
Put the attached files into the backup directory and replace saylar in every script with you username, replace dummy@email.address with the email address you create the gpg keys for and make them executable with:
Code:

chmod a+x scriptname
Also look into rsupload.pl, there is one entry at the end of the file. Afterwards edit the crontab for root
Code:

sudo crontab -e
and put the following there:
Code:

0 6 1 * * /home/saylar/backup/backup_full >> /home/saylar/backup/log/backup_full.log 2>&1
0 6 8,15,23,30 * * /home/saylar/backup/backup_incr_weekly >> /home/saylar/backup/log/backup_incr_weekly.log 2>&1
0 6 2,3,4,5,6,7,9,10,11,12,13,14,16,17,18,19,20,21,22,24,25,26,27,28,29,31 * * /home/saylar/backup/backup_incr_daily >> /home/saylar/backup/log/backup_incr_daily.log 2>&1
30 23 * * * /home/saylar/backup/mvlog > /dev/null

Again, make sure you change the username and you are set for a secure backup stored online.

PS: I'm no programmer at all, so I know that some things could be done much nicer, but it works very well for me. If you have any suggestions, let me you know and I'll be happy to change it.

Sources:
Howto: Backup and restore your system!
Rapidshare Upload Script
GPG Tutorial

Download Backup script Here

Expand full post here...

Comments

Howto: Less typing in the command line

If your like me, a command line junky and you are tired of typing so much here is a simple quick and effective tip.
The BASH shell has several environment variables that can be manipulated. The PATH variable is well known. Another useful variable is CDPATH. As PATH is a list of search paths for commands, so is CDPATH a list of directories used as search path for the "cd" command.
Example: At one ftp server we serve a lot of software, including several of the most popular Linux distributions. The local path to these distributions involves a lot of typing:

defcon@ion:~$ cd /usit/ion/ftp/linux/
defcon@ion:/usit/ion/ftp/linux$

From here, I can jump into "slackware/", "centos/", "debian/" and so on. But it's simpler when using CDPATH:

defcon@ion:~$ export CDPATH="/usit/ion/ftp/linux"
defcon@ion:~$ cd slackware
/usit/ion/ftp/linux/slackware
defcon@ion:/usit/ion/ftp/linux/slackware$

Nice huh?

An even lazier method (involving less typing) is to use alias:

defcon@ion:~$ alias s="cd /usit/ion/ftp/linux/slackware"
defcon@ion:~$ s
defcon@ion:/usit/ion/ftp/linux/slackware$

But then I have to create one alias for each directory. Oh the choices!

Expand full post here...

Comments

Howto: Setup Belkin Wireless G F5D7050 USB Network Adapter on Ubuntu

Basically the Belkin USB adapter aka "rt73" driver was a big pain in the ass when I first installed ubuntu, the thing is, it really isnt hard at all. Here is what I do, everytime I install ubuntu or compile another kernel.

Things you need
1. Ubuntu installed with usb adapter unplugged, yes unplugged!
2. Linux kernel headers from synaptic it looks like /linux-headers-*kernel version*
3. Build-essential packages from synaptic or apt-get build-essential
4. Rt73 Serialmonkey Drivers.
5. I dont like network-manager-gnome, it doesnt work properly with our card so I removed it, it may conflict with your setup. I use Rutilt and I supplied the latest Rutilt v0.15 in .deb made with check install later in this post.

This is all you do


wget http://rt2x00.serialmonkey.com/rt73-cvs-daily.tar.gz

tar zxvf rt73-cvs-daily.tar.gz

cd rt73* <-- extracted dir
cd M* <-- Modules dir
make
strip -S rt73.ko
make install
echo rt73 >>/etc/modules



Now Plug in your Belkin USB dongle.


modprobe rt73

Then type iwconfig and it will be listed as wlan0 or wlan*


If you do not know how to setup your /etc/network/interfaces file you can use a utility called Rutilt which I use to replace gnome-network-manager

How to install Rutilt
wget http://io.storm.googlepages.com/rutiltv0.15_20070805-1_i386.deb

dpkg -i rutiltv0.15_20070805-1_i386.deb

Press Alt F2 after install and type in rutilt to run this, u can add this to gnome-session-properties for autostart


If for some reason this .deb doesnt work for you grab rutilt src from
http://cbbk.free.fr/bonrom/

Examples How to properly setup /etc/network/interfaces for WPA with your Belink USB:

# WORKING STATIC AES/WPA CONFIG
auto wlan0
iface wlan0 inet static
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.1
pre-up ifconfig wlan0 down
pre-up macchanger -A wlan0 # this changes my mac every time I connect to sp00f wifi networks
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 essid MYROUTERNAMEHERE
pre-up iwconfig wlan0 mode managed
pre-up iwpriv wlan0 set Channel=11 #channel where Access point is set, can be set to "auto"
pre-up iwpriv wlan0 set AuthMode=WPAPSK
pre-up iwpriv wlan0 set EncrypType=AES
pre-up iwpriv wlan0 set WPAPSK="wpa password from wpa_passphrase"
pre-up iwpriv wlan0 set TxRate=0
mtu 1454

# WORKING DYNAMIC AES/WPA CONFIG
auto wlan0
iface wlan0 inet dhcp
pre-up ifconfig wlan0 up
pre-up iwconfig wlan0 essid MYROUTERNAMEHERE
pre-up iwconfig wlan0 mode managed
pre-up iwpriv wlan0 set Channel=11 #channel where Access point is set, can be set to "auto"
pre-up iwpriv wlan0 set AuthMode=WPAPSK
pre-up iwpriv wlan0 set EncrypType=AES
pre-up iwpriv wlan0 set WPAPSK=Password_from_wpa_passphrase_via_cmd_line
pre-up iwpriv wlan0 set TxRate=0
mtu 1454

# static configuration for static belkins wep
auto wlan0
iface wlan0 inet static
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.1
wireless-essid ROUTERER ESSID
wireless-key yourhexkeyhere

# dynamic working config for dynamic belkins wep
auto wlan0
iface wlan0 inet dhcp
wireless-essid ESSID
wireless-key hexkeyhere


Expand full post here...

Comments

Howto: Protect Your Ubuntu Machine by Setting up tripwire

After you have disabled all the unneeded services on your system, what remains is a core set of connections and programs that you want to keep. However, you are not finished yet: You need to clamp down your wireless network, lock your server physically, and put scanning procedures in place (such as Tripwire and promiscuous mode network monitors).

Securing a Wireless Network

Because wireless networking has some unique security issues, those issues deserve a separate discussion here.

Wireless networking, although convenient, can be very insecure by its very nature because transmitted data (even encrypted data) can be received by remote devices. Those devices could be in the same room; in the house, apartment, or building next door; or even several blocks away. Extra care must be used to protect the actual frequency used by your network. Great progress has been made in the past couple of years, but the possibility of a security breech is increased when the attacker is in the area and knows the frequency on which to listen. It should also be noted that the encryption method used by more wireless NICs is weaker than other forms of encryption (such as SSH) and should not be considered as part of your security plan.

Tip

Always use OpenSSH-related tools, such as ssh or sftp, to conduct business on your wireless LAN. Passwords are not transmitted as plain text, and your sessions are encrypted.

The better the physical security is around your network, the more secure it will be (this applies to wired networks as well). Keep wireless transmitters (routers, switches, and so on) as close to the center of your building as possible. Note or monitor the range of transmitted signals to determine whether your network is open to mobile network sniffingnow a geek sport known as war driving. (Linux software is available at http://sourceforge.net/project/showfiles.php?group_id=57253.) An occasional walk around your building not only gives you a break from work, but can also give you a chance to notice any people or equipment that should not be in the area.

Keep in mind that it takes only a single rogue wireless access point hooked up to a legitimate network hub to open access to your entire system. These access points can be smaller than a pack of cigarettes, so the only way to spot them is to scan for them with another wireless device.

Passwords and Physical Security


The next step toward better security is to use secure passwords on your network and ensure that users use them as well. For somewhat more physical security, you can force the use of a password with the LILO or GRUB bootloaders, remove bootable devices such as floppy and CD-ROM drives, or configure a network-booting server for Ubuntu. This approach is not well supported or documented at the time of this writing, but you can read about one way to do this in Brieuc Jeunhomme's Network Boot and Exotic Root HOWTO, available at http://www.tldp.org/HOWTO/Network-boot-HOWTO/

Also, keep in mind that some studies show that as much as 90% of network break-ins are by current or former employees. If a person no longer requires access to your network, lock out access or, even better, remove the account immediately. A good security policy also dictates that any data associated with the account first be backed up and retained for a set period of time to ensure against loss of important data. If you are able, remove the terminated employee from the system before he leaves the building.

Finally, be aware of physical security. If a potential attacker can get physical access to your system, getting full access becomes trivial. Keep all servers in a locked room, and ensure that only authorized personnel are given access to clients.

Configuring and Using Tripwire


Tripwire is a security tool that checks the integrity of normal system binaries and reports any changes to syslog or by email. Tripwire is a good tool for ensuring that your binaries have not been replaced by Trojan horse programs. Trojan horses are malicious programs inadvertently installed because of identical filenames to distributed (expected) programs, and they can wreak havoc on a breached system.

Ubuntu does not include the free version of Tripwire, but it can be used to monitor your system. To set up Tripwire for the first time, go to http://www.tripwire.org, and then download and install an open-source version of the software. After installation, run the twinstall.sh script (found under /etc/tripwire) as root like so:

$ sudo /etc/tripwire/twinstall.sh

----------------------------------------------

The Tripwire site and local passphrases are used to

sign a variety of files, such as the configuration,

policy, and database files.



Passphrases should be at least 8 characters in length

and contain both letters and numbers.



See the Tripwire manual for more information.



----------------------------------------------

Creating key files...



(When selecting a passphrase, keep in mind that good passphrases typically

have upper and lower case letters, digits and punctuation marks, and are

at least 8 characters in length.)



Enter the site keyfile passphrase:


You then need to enter a password of at least eight characters (perhaps best is a string of random madness, such as 5fXkc4ln) at least twice. The script generates keys for your site (host) and then asks you to enter a password (twice) for local use. You are then asked to enter the new site password. After following the prompts, the (rather extensive) default configuration and policy files (tw.cfg and tw.pol) are encrypted. You should then back up and delete the original plain-text files installed by Ubuntu.

To then initialize Tripwire, use its --init option like so:

$ sudo tripwire --init

Please enter your local passphrase:

Parsing policy file: /etc/tripwire/tw.pol

Generating the database...

*** Processing Unix File System ***

....

Wrote database file: /var/lib/tripwire/shuttle2.twd

The database was successfully generated.



Note that not all the output is shown here. After Tripwire has created its database (which is a snapshot of your file system), it uses this baseline along with the encrypted configuration and policy settings under the /etc/tripwire directory to monitor the status of your system. You should then start Tripwire in its integrity checking mode, using a desired option. (See the TRipwire manual page for details.) For example, you can have Tripwire check your system and then generate a report at the command line, like so:

# tripwire -m c


No output is shown here, but a report is displayed in this example. The output could be redirected to a file, but a report is saved as /var/lib/tripwire/report/hostname-YYYYMMDD-HHMMSS.twr (in other words, using your host's name, the year, the month, the day, the hour, the minute, and the seconds). This report can be read using the twprint utility, like so:

# twprint --print-report -r \

/var/lib/tripwire/report/shuttle2-20020919-181049.twr | less



Other options, such as emailing the report, are supported by Tripwire, which should be run as a scheduled task by your system's scheduling table, /etc/crontab, on off-hours. (It can be resource intensive on less powerful computers.) The Tripwire software package also includes a twadmin utility you can use to fine-tune or change settings or policies or to perform other administrative duties.

Devices


Do not ever advertise that you have set a NIC to promiscuous mode. Promiscuous mode (which can be set on an interface by using ifconfig's promisc option) is good for monitoring traffic across the network and can often allow you to monitor the actions of someone who might have broken into your network. The tcpdump command also sets a designated interface to promiscuous mode while the program runs; unfortunately, the ifconfig command does not report this fact while tcpdump is running!

Do not forget to use the right tool for the right job. Although a network bridge can be used to connect your network to the Internet, it would not be a good option. Bridges have almost become obsolete because they forward any packet that comes their way, which is not good when a bridge is connected to the Internet. A router enables you to filter which packets are relayed.

Expand full post here...

Comments

Clicky Web Analytics