<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8622402438977914918</id><updated>2011-08-18T08:15:47.965-07:00</updated><category term='debian'/><category term='server'/><category term='encryption'/><category term='apt'/><category term='installation'/><category term='configuration'/><category term='ssss'/><category term='security'/><category term='sed text edit'/><category term='amd radeon dri xorg debian lenny ati'/><category term='passwords'/><title type='text'>Umbra's blog</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-7853325829126811066</id><published>2010-02-12T09:09:00.000-08:00</published><updated>2010-02-12T09:15:04.748-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='sed text edit'/><title type='text'>Sed</title><content type='html'>I will be posting sed related items in this space.  Useful information can be found at:&lt;br /&gt;http://www.gnu.org/software/sed/&lt;br /&gt;http://www.unixguide.net/unix/sedoneliner.shtml&lt;br /&gt;&lt;br /&gt;  Remove hyphenation and join the lines together (rejoining the word).  I don't think this works on two consecutive lines that end in hyphenation.&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;sed -e '/-$/{s///;N;s/\n//}'&lt;br /&gt;EDOC&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-7853325829126811066?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/7853325829126811066/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=7853325829126811066' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/7853325829126811066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/7853325829126811066'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2010/02/sed.html' title='Sed'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-7639100596633568233</id><published>2009-11-13T08:58:00.000-08:00</published><updated>2010-02-12T09:17:56.511-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='amd radeon dri xorg debian lenny ati'/><title type='text'>Radeon driver with Tyan Tiger MP motherboard Linux module incompatability</title><content type='html'>Had a lot of trouble getting my ati radeon RV350 (9600) based card to work with Xorg under Debian lenny.  It just wasn't setting the resolution correctly and everything on the screen "wiggled" just a bit, which would cause lots of headaches (literally).  The problem is because DRI is failing to initialize, as per this entry in /var/log/Xorg.0.log:&lt;br /&gt;&lt;br /&gt;----LOG----&lt;br /&gt;(EE) RADEON(0): [agp] AGP failed to initialize. Disabling the DRI.&lt;br /&gt;(II) RADEON(0): [agp] You may want to make sure the agpgart kernel module is loaded before the radeon kernel module.&lt;br /&gt;----GOL----&lt;br /&gt;&lt;br /&gt;  The issue is in the load order of the related kernel modules for the motherboard chipset and the video card.  I have a Tyan Tiger MP motherboard, which uses the AMD k7 chipset, but the solution is similar regardless of the motherboard chipset.&lt;br /&gt;&lt;br /&gt;  The relevant lines of lspci:&lt;br /&gt;&lt;br /&gt;00:00.0 Host bridge: Advanced Micro Devices [AMD] AMD-760 MP [IGD4-2P] System Controller (rev 11)&lt;br /&gt;00:01.0 PCI bridge: Advanced Micro Devices [AMD] AMD-760 MP [IGD4-2P] AGP Bridge&lt;br /&gt;01:05.0 VGA compatible controller: ATI Technologies Inc RV350 AP [Radeon 9600]&lt;br /&gt;&lt;br /&gt;  The solution was to blacklist the amd76x_edac module to by adding "blacklist amd76x_edac" to /etc/modprobe.d/blacklist .&lt;br /&gt;&lt;br /&gt;  Or you can use this snippit at your command prompt&lt;br /&gt;&lt;br /&gt;#### CODE&lt;br /&gt;&lt;br /&gt;echo 'blacklist amd76x_edac' | sudo tee -a /etc/modprobe.d/blacklist&lt;br /&gt;&lt;br /&gt;#### EDOC&lt;br /&gt;&lt;br /&gt;  I am unclear what exactly this module does.  You may loose some other functionality as a result of this blacklisting, so your mileage may vary, and i offer no guarantees.&lt;br /&gt;&lt;br /&gt;  A lot of related information can be found in the first few links of &lt;a href="http://www.google.com/search?q=radeon+amd+xorg+%22AGP+failed+to+initialize.+Disabling+the+DRI%22"&gt;Google&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-7639100596633568233?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/7639100596633568233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=7639100596633568233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/7639100596633568233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/7639100596633568233'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2009/11/had-lot-of-trouble-getting-my-ati.html' title='Radeon driver with Tyan Tiger MP motherboard Linux module incompatability'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-8352960388070806399</id><published>2008-09-18T09:04:00.000-07:00</published><updated>2009-05-19T11:24:47.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='passwords'/><category scheme='http://www.blogger.com/atom/ns#' term='encryption'/><category scheme='http://www.blogger.com/atom/ns#' term='ssss'/><title type='text'>Password safety net with ssss</title><content type='html'>Short version:  I lost all my passwords, but was fortunately able to recover them.  None of this should have happened, because I am a stickler for this sort of thing.&lt;br /&gt;&lt;br /&gt;However, it has taught me a valuable lesson about ensuring that passwords are safe.  Here's how I have done it.&lt;br /&gt;&lt;br /&gt;I am going to assume that you either have some knowledge of encryption, or are willing to take on faith that this will work.  If you want to follow along with the recipe, you will need:  *nix, openssl, ssss, a2ps.&lt;br /&gt;&lt;br /&gt;First, create a file with your important passwords in it.  This should be a plain text file since that is most accessible.  The following scheme can even be used in a "in the event of my death" scenario, so it is useful to make it easy for others to access your file later.  I will refer to this file as "passwords.txt".&lt;br /&gt;&lt;br /&gt;Encrypt the file with a symmetric cipher and a password on the symmetric key.  The password need not be memorable, at least not longer than until you finish the end of this task.  It should be long enough that the password is not the weak link in your chain of protection; about 40 characters should do.  It should also follow the usual guidelines for password security (see &lt;a href="http://www.securityfocus.com/infocus/1537"&gt;http://www.securityfocus.com/infocus/1537&lt;/a&gt; ).&lt;br /&gt;&lt;br /&gt;I did it this way, on a Linux command line:&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;dd if=/dev/random bs=40 count=1 | openssl enc -base64 | head -c 40 &gt; random.txt&lt;br /&gt;&lt;br /&gt;EDOC&lt;br /&gt;&lt;br /&gt;Next the encryption.  You can use gpg, pgp or some other encryption utility.  Remember that you want symmetric encryption though.  Here's mine:&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;openssl enc -aes-256-ecb -a -salt -pass file:random.txt  -out password.enc&lt;br /&gt;&lt;br /&gt;EDOC&lt;br /&gt;&lt;br /&gt;You now have an encrypted password file.  If you want to be able to store your passwords encrypted with a memorable password, just do this instead and enter a suitable password (try for at least 20 characters, and remember strong password rules):&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;openssl enc -aes-256-ecb -a -salt  -out password.enc&lt;br /&gt;&lt;br /&gt;EDOC&lt;br /&gt;&lt;br /&gt;Back to the main story.  Next you will create a scheme by which the password can be retrieved.  This will entail splitting the password into (cryptographically sound) parts, or "shares".  You need to decide how many shares are necessary to reconstruct the password, but you can generate as many as you like.&lt;br /&gt;&lt;br /&gt;I decided to create 15 shares, of which any 8 are necessary to reconstruct the password.  I kept 5 of them for myself, so I only need 3 collaborators to get my password file back.  The other 10 I gave to family and friends.  I also gave them a copy of the encrypted password file.  While it would be possible for a group of 8 to collude to get my information, I trust them enough not to do so, and I also made sure that some of the individuals don't know each other.&lt;br /&gt;&lt;br /&gt;Unfortunately, the command requries you to enter the password to be split manually.  I recommend using the clipboard, since it doesn't even prompt you a second time to verify you input it correctly, and also doesn't output to the screen.  You should change the numbers to suit your needs, but leave the 1024 as is.&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;ssss-split -t 8 -n 15 -s 1024 &gt; shares.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_0"&gt;txt&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_1"&gt;EDOC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Each line of shares.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_2"&gt;txt&lt;/span&gt; is a share; distribute them as you see fit.&lt;br /&gt;&lt;br /&gt;While this is not the point of this post, it is a good idea to test that everything works by reversing the process before you delete anything, as follows:&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_3"&gt;ssss&lt;/span&gt;-combine -t 8&lt;br /&gt;&lt;enter&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_4"&gt;EDOC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;That should have returned the original password.&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_5"&gt;openssl&lt;/span&gt; enc -d &lt;span class="blsp-spelling-error" id="SPELLING_ERROR_6"&gt;-aes&lt;/span&gt;-256-&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_7"&gt;ecb&lt;/span&gt; -a -in password.enc -out password.test&lt;br /&gt;&lt;enter&gt;&lt;br /&gt;&lt;br /&gt;EDOC&lt;br /&gt;&lt;br /&gt;password.test should be identical to password.txt.&lt;br /&gt;&lt;br /&gt;I put my password.enc and shares.txt on paper thusly:&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;a2ps --columns=1 -B password.enc &gt; password.enc.ps&lt;br /&gt;a2ps --columns=1 -B shares.txt &gt; shares.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_8"&gt;ps&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_9"&gt;EDOC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I printed these off, and made 11 copies of password.enc.ps.  I gave one to each individual getting a share.  I also printed the shares, cut out each share with scissors, and passed them out.&lt;br /&gt;&lt;br /&gt;Last but not least, delete things (be sure you are finished first!):&lt;br /&gt;&lt;br /&gt;CODE&lt;br /&gt;&lt;br /&gt;shred -u -z passwords.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_10"&gt;txt&lt;/span&gt; passwords.enc passwords.enc.ps shares.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_11"&gt;txt&lt;/span&gt; shares.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_12"&gt;ps&lt;/span&gt; random.&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_13"&gt;txt&lt;/span&gt; password.test&lt;br /&gt;&lt;br /&gt;&lt;span class="blsp-spelling-error" id="SPELLING_ERROR_14"&gt;EDOC&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You must distribute the shares.  Keeping them all in one place is the same as having your password written down!&lt;/enter&gt;&lt;/enter&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-8352960388070806399?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/8352960388070806399/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=8352960388070806399' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/8352960388070806399'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/8352960388070806399'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2008/09/password-safety-net-with-ssss.html' title='Password safety net with ssss'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-6436211175706067446</id><published>2007-07-03T14:29:00.000-07:00</published><updated>2007-07-07T10:54:17.737-07:00</updated><title type='text'>Debian server configuration : sudo</title><content type='html'>Sudo is a (IMNSHO) better way to handle root user access than su.  It does allow you to run commands as users other than root, but that will not be covered in detail here.&lt;br /&gt;&lt;br /&gt;Sudo's config file resides at /etc/sudoers.  Sudo is very particular about it's config file:  anything that isn't exactly as it should be causes sudo to fail to run.  This is a security feature, do not complain.  Therefore, you should get in the habit of frequently running "sudo -v" to validate sudoers as you edit.  Specifically, do &lt;span style="font-style: italic;"&gt;not&lt;/span&gt; close your editor until you have validated sudoers.&lt;br /&gt;&lt;br /&gt;sudo will also fail to run if write permission is granted on the config file, so editing it directly can cause problems, especially since the configuration settings suggested below disable su.&lt;br /&gt;&lt;br /&gt;Instead, you should set your shells EDITOR and/or VISUAL variables to an editor of you liking (the default is vi).  You may then invoke "sudoedit /etc/sudoers" to edit the file.  Remember to run "sudo -v" before closing the editor!&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;#----Begin sudoers edits&lt;br /&gt;&lt;br /&gt;# Create an alias which contains the&lt;br /&gt;# privelged access commands,&lt;br /&gt;# namely su and sudo.&lt;br /&gt;&lt;br /&gt;Cmnd_Alias SU = /bin/su, /usr/bin/sudo&lt;br /&gt;&lt;br /&gt;# It may be possible for a user to&lt;br /&gt;# circumvent sudo's logging facilities&lt;br /&gt;# by running certain shells.  Therefore,&lt;br /&gt;# we prohibit running shells via sudo.&lt;br /&gt;&lt;br /&gt;Cmnd_Alias SHELLS = /bin/csh, /bin/sh, \&lt;br /&gt;/usr/bin/es, /bin/ksh, /usr/bin/ksh, \&lt;br /&gt;/usr/bin/rc, /usr/bin/tcsh, /bin/tcsh, \&lt;br /&gt;/usr/bin/esh, /bin/bash, /bin/rbash, \&lt;br /&gt;/bin/zsh, /usr/bin/zsh&lt;br /&gt;&lt;br /&gt;# The following line should be&lt;br /&gt;# included by default.&lt;br /&gt;root     ALL=(ALL) ALL&lt;br /&gt;&lt;br /&gt;# Replace "admin" with username&lt;br /&gt;# of the administrator account&lt;br /&gt;# You can also use a comma&lt;br /&gt;# seperated list, or a User_Alias&lt;br /&gt;# similar to Cmnd_Alias to&lt;br /&gt;# create a list to be used.&lt;br /&gt;# A third option is to use %group,&lt;br /&gt;# where "group" is a usergroup defined&lt;br /&gt;# in /etc/groups.&lt;br /&gt;#&lt;br /&gt;# This grants access to "admin" to&lt;br /&gt;#  run any command on any host,&lt;br /&gt;# but does not allow admin to&lt;br /&gt;#  run as any other user.&lt;br /&gt;&lt;br /&gt;admin    ALL=ALL&lt;br /&gt;&lt;br /&gt;# The order of this entry is important;&lt;br /&gt;#  it should generally be the last entry!&lt;br /&gt;# This disables any user from running&lt;br /&gt;# su, sudo, or any shell via sudo.&lt;br /&gt;&lt;br /&gt;ALL      ALL=!SU, !SHELLS&lt;br /&gt;&lt;br /&gt;#----End sudoers edits&lt;br /&gt;&lt;br /&gt;sudo is included in the SU alias to safegaurd ourselves:  If user A can run commands as user B, and user B can run commands as root, then user A can run commands as root via sudo. Including sudo in the list prevents us from mistakenly causing this.&lt;br /&gt;&lt;br /&gt;It is important to keep the shell list up to date with shells you install: See /etc/shells to view all your installed shells.&lt;br /&gt;&lt;br /&gt;If you would like to add more entries, the format of access entries is:&lt;br /&gt;userlist hostlist=(userlist) commandlist&lt;br /&gt;&lt;br /&gt;A list is a comma seperated list of the specified type.  Generally, hostlist should be ALL.&lt;br /&gt;&lt;br /&gt;It is usually not necessary to specify the (userlist) entry.  It is used to allow that entry to be run as anyone (i.e. user) in (userlist).  Not including it means the user the command can be run under can not be changed.&lt;br /&gt;&lt;br /&gt;If you would like "admin" to be able to run commands as any user, add him to the "root" line instead of specifying his own entry:&lt;br /&gt;root, admin ALL=(ALL) ALL&lt;br /&gt;&lt;br /&gt;Note that these settings do &lt;span style="font-style: italic; font-weight: bold;"&gt;not&lt;/span&gt; disable su entirely.  If someone learns the password to a login account (such as root), they can still change to that user via su.  Removing this functionality is beyound the scope of sudo.  You may remove su from your system, but this may cause some systems to break (you have been warned).  You could also disable certain logins (such as root), by setting their password (2nd field) in /etc/shadow to *, but again this may break things (and you have been warned again).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More information can be found at:&lt;br /&gt;man sudo&lt;br /&gt;man sudoers&lt;br /&gt;http://www.linuxhelp.net/guides/sudo/&lt;br /&gt;http://www.linuxhomenetworking.com/wiki/index.php/Quick_HOWTO_:_Ch09_:_Linux_Users_and_Sudo&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-6436211175706067446?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/6436211175706067446/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=6436211175706067446' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/6436211175706067446'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/6436211175706067446'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2007/07/debian-server-configuration-sudo.html' title='Debian server configuration : sudo'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-8013619679005240425</id><published>2007-06-30T14:00:00.000-07:00</published><updated>2009-05-19T09:53:47.998-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Debian server configuration : sshd</title><content type='html'>Your sshd configuration files is located at /etc/ssh/sshd_config.&lt;br /&gt;&lt;br /&gt;The following discussion applies to the Debian openssh-server package, specifically lenny as of time of posting.  If you are using some other system/version, some settings you likely should change will not be covered here, because the Debian defaults are to my liking.  You have be WARNED!&lt;br /&gt;&lt;br /&gt;Some of the default settings that openssh-server comes with make me extremely nervous.  The security is too lax.  Here are some changes i like to make to tighten things up to my personal level of paranoia.  YMMV.&lt;br /&gt;&lt;br /&gt;ListenAddress&lt;br /&gt;Set this to network interface you wish sshd to accept connections on.  It is good practice to set this even if you have only one interface, so sshd will fail if your network configuration changes mysteriously, and (possibly) to help prevent some spoofing.&lt;br /&gt;You may specify more than one interface by using multiple ListenAdress entries.  For instance, you may wish to include a ListenAddress 127.0.0.1 in addition to any external interfaces, though i don't recommend this.&lt;br /&gt;&lt;br /&gt;Protocol 2&lt;br /&gt;Definetely should be set to 2, unless you have a &lt;span style="font-style: italic;"&gt;very&lt;/span&gt; good reason to do otherwise.&lt;br /&gt;&lt;br /&gt;Hostkey&lt;br /&gt;You should comment out any entries for protocol 1, even if you have specified Protocol 2 explicity above.  Could save you pain in the future.&lt;br /&gt;&lt;br /&gt;ServerKeyBits&lt;br /&gt;If you don't mind more cpu overhead, and you feel paranoid, add some more bits until satisfied.&lt;br /&gt;&lt;br /&gt;KeyRegenerationInterval&lt;br /&gt;If you are truly paranoid and don't mind cpu overhead, set this to a smaller value (it is in seconds, so 3600 = 1 hour).&lt;br /&gt;&lt;br /&gt;PermitRootLogin no&lt;br /&gt;Highly recommend this set to no.  Forces users to login as a regular user, and then use sudo to do any actions as root.  As a side benefit, you will be able to track such things better in your logs.&lt;br /&gt;&lt;br /&gt;RSAAuthentication no&lt;br /&gt;Should be no, especially if using Protocol 2.&lt;br /&gt;&lt;br /&gt;IgnoreUserKnownHosts yes&lt;br /&gt;I'm paranoid, so i turn this off (i.e. yes).  It probably is safe to leave it no.&lt;br /&gt;&lt;br /&gt;PasswordAuthentication no&lt;br /&gt;Again, paranoia.  Tunneled passwords are generally safe.  That is, they are as safe as the passwords themselves (which can mean, "not very"). But PubkeyAuthentication is better.  Turning all forms of authentication except Pubkey off means Pubkey is the only way, which is nice and safe.  However, disabling this will likely mean the system administrator (i.e. you) is involved in giving each user ssh access, each and every time.  You decide.&lt;br /&gt;&lt;br /&gt;ChallengeResponseAuthentication no&lt;br /&gt;Once again, i only really trust PubkeyAuthentication, so this gets turned off (i.e. no).  In reality, s/key is generally safe to use.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More information can be found at:&lt;br /&gt;http://www.faqs.org/docs/securing/chap15sec122.html&lt;br /&gt;http://www.gentoo.org/proj/en/infrastructure/config-ssh.xml?style=printable&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-8013619679005240425?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/8013619679005240425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=8013619679005240425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/8013619679005240425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/8013619679005240425'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2007/06/debian-server-configuration-sshd.html' title='Debian server configuration : sshd'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-6017324417740439184</id><published>2007-06-30T13:50:00.000-07:00</published><updated>2007-06-30T13:59:11.491-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='security'/><title type='text'>Debian server configuration : tcpd / libwrap</title><content type='html'>Editing /etc/hosts.allow and /etc/hosts.deny to tighten up security.  See man hosts_access for information.&lt;br /&gt;&lt;br /&gt;  I subscribe to the "that which is not explicitly allowed is denied" philosophy of security.  Therefore, my /etc/hosts.deny has only one line:&lt;br /&gt;ALL:ALL&lt;br /&gt;&lt;br /&gt;  That is, deny everything to everybody (unless it is specifically granted in /etc/hosts.allow).&lt;br /&gt;&lt;br /&gt;  Doing this will require you to name all services which you wish to grant access to in /etc/hosts.allow.  An example you will likely find useful is:&lt;br /&gt;sshd: 192.168.&lt;br /&gt;&lt;br /&gt;  This means allow ssh access to anyone on the internal (192.168.x.x IP's do not route on the Internet) network.  You will likely wish to suplement this with firewall rules that verify that packets entering from the Internet are not spoofed to apear to come from your internal network before allowing them into your server.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-6017324417740439184?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/6017324417740439184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=6017324417740439184' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/6017324417740439184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/6017324417740439184'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2007/06/debian-server-configuration-tcpd.html' title='Debian server configuration : tcpd / libwrap'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-1965236389362858996</id><published>2007-06-30T13:38:00.000-07:00</published><updated>2007-06-30T13:48:36.620-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='apt'/><title type='text'>Debian server configuration : apt</title><content type='html'>I like to be able to pull in packages from unstable occasionally, though i avoid it as much as possible to keep my system from becoming... well unstable.  To be able to do this, you must edit your /etc/apt/preferences similar to the following:&lt;br /&gt;&lt;br /&gt;#BEGIN /etc/apt/preferences&lt;br /&gt;&lt;br /&gt;Package: *&lt;br /&gt;Pin: release o=Debian,a=testing&lt;br /&gt;Pin-Priority: 900&lt;br /&gt;&lt;br /&gt;Package: *&lt;br /&gt;Pin: release o=Debian,a=unstable&lt;br /&gt;Pin-Priority: 300&lt;br /&gt;&lt;br /&gt;Package: *&lt;br /&gt;Pin: release o=Debian&lt;br /&gt;Pin-Priority: -1&lt;br /&gt;&lt;br /&gt;#END /etc/apt/prefrences&lt;br /&gt;&lt;br /&gt;Similarly, you can setup pulling testing packages into a stable system by replacing all instances of "testing" with "stable", and then all instances of "unstable" with "testing".&lt;br /&gt;&lt;br /&gt;  You will need to setup an apt source (in /etc/apt/sources) for the target release (i.e. "unstable" in the example above) and then perform an "apt-get update".&lt;br /&gt;&lt;br /&gt;  Afterwards, you can install packages from unstable with:&lt;br /&gt;apt-get -t unstable install some-pakage&lt;br /&gt;&lt;br /&gt;  If you wish to install packages from your default release (i.e. testing in the example above), just use apt-get normally, without the -t switch.&lt;br /&gt;&lt;br /&gt;  This was pulled in large part from the following pages, which will give you a more complete explanation:&lt;br /&gt;http://www.debian.org/doc/manuals/apt-howto/ch-apt-get.en.html#s-pin&lt;br /&gt;http://jaqque.sbih.org/kplug/apt-pinning.html&lt;br /&gt;http://wiki.serios.net/wiki/Apt-Pinning_on_Debian&lt;br /&gt;http://wiki.debian.org/AptPinning&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-1965236389362858996?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/1965236389362858996/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=1965236389362858996' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/1965236389362858996'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/1965236389362858996'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2007/06/debian-server-configuration-apt_30.html' title='Debian server configuration : apt'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-1488700378214533367</id><published>2007-06-30T13:29:00.000-07:00</published><updated>2007-06-30T13:36:39.116-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='configuration'/><category scheme='http://www.blogger.com/atom/ns#' term='apt'/><title type='text'>Debian server configuration : apt</title><content type='html'>Added 00queuemode into /etc/apt/apt.conf.d with the following contents:&lt;br /&gt;APT::Acquire::Queue-Mode "host";&lt;br /&gt;&lt;br /&gt;  This speeds up "apt-get update &amp;&amp; apt-get dist-upgrade" if you use more than one apt source, as i do.  It tells apt to download in parrallel, one connection per source in /etc/apt/sources&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-1488700378214533367?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/1488700378214533367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=1488700378214533367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/1488700378214533367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/1488700378214533367'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2007/06/debian-server-configuration-apt.html' title='Debian server configuration : apt'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8622402438977914918.post-3458828219157408901</id><published>2007-06-30T12:56:00.000-07:00</published><updated>2009-05-19T10:03:05.207-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='server'/><category scheme='http://www.blogger.com/atom/ns#' term='debian'/><category scheme='http://www.blogger.com/atom/ns#' term='installation'/><title type='text'>Debian lenny server installation</title><content type='html'>Recently began a server installation, and have decided to document it here for others to learn from my mistakes.&lt;br /&gt;&lt;br /&gt;I have been running Debian for about 7 years now, and linux for about 9.  I have administered a few servers before now, this effort is to create one that will be fairly self-sufficient.  That is, i won't need to spend a lot of time maintaining it.  Yes, i know i am lying to myself.&lt;br /&gt;&lt;br /&gt;The hardware is a dual Athlon 3200 system on a Tyan Tiger MP motherboard with 1GB of RAM.&lt;br /&gt;&lt;br /&gt;During installation, i partitioned thusly:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt; hda1 : 1.5 GB : swap&lt;/li&gt;&lt;li&gt;hda2 : 100MB : ext3 : /boot&lt;/li&gt;&lt;li&gt;hda3 : The rest : physical partition of LVM volume&lt;/li&gt;&lt;li&gt;LVM : xfs : /&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;  I chose to put /boot on it's own drive so i could format it as ext3.  I've had problems with the Debian installer loading grub onto xfs partitions.&lt;br /&gt;Even though i am only using a single drive, i chose to use LVM to make future expansion easier.  When i add a new drive, all i need to do is add it to LVM, and / gets bigger.&lt;br /&gt;&lt;br /&gt;I did not seperate the drive into more partitions because i have found this typically leads to wasted drive space.  Instead, my plan is to create files with filesystems in them, then mount them via loopback on certain points of the directory, such as /var and /home.&lt;br /&gt;This has the following benefits:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Enlarge the files as needed&lt;/li&gt;&lt;li&gt;Add compression and encryption at a later date&lt;/li&gt;&lt;li&gt;Bulk backups of these brances of the directory tree are easy&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;  It has one disadvantage i can think of:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Adds an extra layer of "dereferencing" on all access to these "partitions", making it a bit slower&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;After installation, i remove /tmp and replace it with a link to /dev/shm.&lt;br /&gt;&lt;br /&gt;CODE (as root)&lt;br /&gt;cd / &amp;amp;&amp;amp; rm -r tmp &amp;amp;&amp;amp; ln -s /dev/shm tmp&lt;br /&gt;EDOC&lt;br /&gt;&lt;br /&gt;I do the same for /var/tmp and /var/lock.  I also remove /var/run and replace it with a link to /lib/init/rw.  These choices were made to preserve the directories permissions.&lt;br /&gt;&lt;br /&gt;I highly recommend the above on all systems, as it speeds up /tmp (and the rest) considerably, with no loss of functionality.  You may wish to make you swap drive larger if /tmp is used a lot on your machine.&lt;br /&gt;&lt;br /&gt;I experienced problems with resuming from sleep/hibernate with this configuration.  However, on a server, this should never occur, and therefor this should be simple enough.&lt;br /&gt;&lt;br /&gt;I installed only the base system, and then installed all the packages i want manually via apt.&lt;br /&gt;&lt;br /&gt;First however, i removed the following packages:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;portmap&lt;/li&gt;&lt;li&gt;nfs-common&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;  Neither of these should be in the base install IMNSHO.&lt;br /&gt;&lt;br /&gt;I added the following, which i recommend for server installations:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;git&lt;/li&gt;&lt;li&gt;openssh-server&lt;/li&gt;&lt;li&gt;sudo&lt;/li&gt;&lt;li&gt;deborphan&lt;/li&gt;&lt;li&gt;localepurge&lt;/li&gt;&lt;li&gt;gnupg&lt;/li&gt;&lt;li&gt;ntpdate&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Additionally, i added the following, since my server will be sitting idle a lot, and i want to save as much power (and lower it's thermal output) as much as possible:&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;acpid&lt;/li&gt;&lt;li&gt;noflushd&lt;/li&gt;&lt;li&gt;powersaved&lt;/li&gt;&lt;li&gt;hal-device-manager&lt;/li&gt;&lt;li&gt;powertop&lt;/li&gt;&lt;li&gt;cpufrequtils&lt;br /&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;In addition to using git for all the projects i work on, i also use it to track /etc changes.  My method is to add files immediately before first editing them.  Some people i know just track the whole directory.  I find the latter approach inefficient, as it tracks all of the Debian updates as well as my own, but it is a lot simpler.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8622402438977914918-3458828219157408901?l=umbras-blog.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://umbras-blog.blogspot.com/feeds/3458828219157408901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8622402438977914918&amp;postID=3458828219157408901' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/3458828219157408901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8622402438977914918/posts/default/3458828219157408901'/><link rel='alternate' type='text/html' href='http://umbras-blog.blogspot.com/2007/06/debian-lenny-server-installation.html' title='Debian lenny server installation'/><author><name>umbra</name><uri>http://www.blogger.com/profile/01901705147553389357</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>
