Copy directory structure without directory contents

terminal.png

mkdir /where/you/wantem
cd /source/dir
find * -type d -exec mkdir /where/you/wantem/\{\} \;

Fix Fedora 12s Broken User Access

fedora.png

A hotly debated topic this week has been a decision made with the latest release of Fedora. The 12th release has made it so that local users can install signed packages from the repositories, without root access.

You can read all the nerd-rage here:

Fedora 12 allows any user to install software on a machine without the root password. Drama on the mailing list.

Oddly enough they didn’t see this important enough to include on the release notes.   Some will argue this is not much of an issue, well I would ask you to consider this security breach of the Fedora signing servers a little more than a year ago:

https://www.redhat.com/archives/fedora-announce-list/2008-August/msg00012.html

With that taken into consideration, this is a pretty big deal.

Jeff Garzik’s replies seem to be the most eloquent arguments for reverting to the F11 security posture, in case anyone here thinks this change is a good thing:

Now for what this blog usually does, which is gives more solutions than commentary, here is how you fix your Fedora 12’s broken security model:

Simply run:

pklalockdown –lockdown org.freedesktop.packagekit.package-install

This will re-enable the old (better) behavior for installing signed packages with a known key.  Once this is done your Fedora 12 will no longer be on par with Windows98, enjoy.

Gmail, offlineimap, msmtp, and mutt for command line email

mutt.png

Collecting bits and pieces over the past year, I’ve come up with the perfect solution for email on the command line.   Enjoy.

Continue reading ‘Gmail, offlineimap, msmtp, and mutt for command line email’ »

Basics of User Management

tux.png

A comprehensive guide for basic user management of a linux box:
Continue reading ‘Basics of User Management’ »

An overview of the find command

terminal.png

Let us see how to use find command to  gain lots of useful information about users and their files.

Continue reading ‘An overview of the find command’ »

The most common usage of sed

terminal.png

make a file with your favorite text editor. Name this file “old” and place the word “day” within it. Save it in your home directory. /home/<username>.

Now in a shell run:

sed s/day/night/ old >new

Now you will have a file called “new”. Open that file and it should have changed the word day to night.

Re-edit the file “old” and make it look like this:

day day day

day

day

Save the file.

This time we’ll run a similar command

sed s/day/night/ old>new.2

When viewing the file new.2 you will see this:

night day day day

night

night

You will notice only the first field in each line got changed. Most Unix utilties work on files, reading a line at a time. Sed, by default, is the same way. If you tell it to change a word, it will only change the first occurrence of the word on a line. You may want to make the change on every word on the line instead of the first.

sed s/day/night/g old>new.3

Now if you view the new.3 file, every instance of day should have turned to night:

$ cat new.3

night night night night

night

night

The ‘g’ option tells sed to run globally and not for the first instance within each line.

This is my very over simplified take on sed. Please see the link above and the sed man page for more. Feel free to talk about it

For a more advanced look at Sed please see here: http://www.grymoire.com/Unix/Sed.html

Fix: Number Pad Will Not Work in Ubuntu

ubuntu.png

Sometimes when I’ve been messing around on Ubuntu my number pad will quit working.  The number lock is on, I can see the indicator right there.  Toggling the num lock on and off doesn’t fix things.  I found that holding 8, 2, 4, or 6 moves the cursor on the screen though.

This is an Accessibility option that gets turned on to control the cursor with the number pad.  For some reason unknown to me Ubuntu chooses to turn on what it calls “Mouse Keys”.

Continue reading ‘Fix: Number Pad Will Not Work in Ubuntu’ »

Sync Tomboy Notes with Dropbox in Ubuntu

tomboy.png

Recently covered how to sync Tomboy notes across the Ubuntu One network, but many out there prefer file sharing in the cloud to be a bit less “beta” and use Dropbox instead.   Luckily syncing Tomboy notes isn’t too terribly difficult this way either.

Continue reading ‘Sync Tomboy Notes with Dropbox in Ubuntu’ »

Fix Ctrl Alt Backspace behavior in Ubuntu

ubuntu.png

Ubuntu 9.04 disabled the semi-crucial keyboard shortcut, Ctrl+Alt+Backspace, that used to force the X graphical server to restart, and made it wonky to re-enable. Luckily, Ubuntu 9.10, due out in nine days, has a single setting to restore it.

Go to System->Preferences->Keyboard settings, then head to the Layouts tab under Keyboard settings, click the “Key sequence to kill the X server” option to expand it, then check “Control + Alt + Backspace” to set it.

Also see: Ctrl+Alt+Backspace Disabled in Most Distributions [FIX]

Get the old notification system back in Ubuntu 9.04 and 9.10

ubuntu.png

The next Ubuntu release (9.04, “Jaunty Jackalope”) will see the first set of changes introduced by Canonical’s Desktop Experience Team: The much-discussed notify-osd notification system, and the indicator applet.

The idea came up to allow both developers and users to be able to choose between the “Ubuntuized” and a more “upstream-like” GNOME experience.  Martin Pitt (maintainer) has  called that “stracciatella GNOME session”, after the favourite kind of ice cream which is mostly vanilla (GNOME), but with some brown chocolate chips (Ubuntu modifications) in it.

To enable this feature simply run the following:

apt-get install gnome-stracciatella-session

and select the “GNOME (without Ubuntu specific components)” session in gdm.

In Jaunty or Karmic, this will suppress the messaging indicator and flip back to the classical GNOME notification-daemon again.  Martin Pitt plans to keep stracciatella-session up to date with new developments in future Ubuntu releases as well.

Pages: 1 2 3 4 5 6 7 8 ...63 64 65 Next