Debian is a popular and influential GNU/Linux distribution. Questions here should generally be about Debian Server.

learn more… | top users | synonyms

6
votes
1answer
2k views

Prevent mail being marked as spam

This is a canonical question about avoiding outgoing mail being classified as spam. I'm wondering how to prevent my emails from my site being marked as spam? I'm using sendmail. I'm trying to ...
164
votes
3answers
113k views

What's the best way of handling permissions for apache2's user www-data in /var/www?

Has anyone got a nice solution for handling files in /var/www? We're running Name Based Virtual Hosts and the apache2 user is www-data. We've got two regular users & root. So when messing with ...
18
votes
5answers
12k views

How can I chroot ssh connections?

I would like to setup a chroot jail for most (not all) users logging in though SSH. I've heard it's possible with the latest versions of openssh, but I've not been able to find out how to do it. The ...
3
votes
4answers
765 views

ssh delay when connecting

When connecting to one specific server (running Debian Lenny) it always takes about 5 seconds before it prompts me to enter a password. After login there is no noticable delay anymore. There is also ...
14
votes
5answers
69k views

Huge amount of TIME_WAIT connections says netstat

Okay, this is creeping me out - I see about 1500-2500 of these: root@wherever:# netstat Proto Recv-Q Send-Q Local Address Foreign Address State tcp 0 0 ...
23
votes
7answers
24k views

how can I limit per user bandwidth?

To summarise: I have a dedicated server with a few friends running a torrent client with web gui. Each user is running a client under their username on the server so downloads go in their user dir, ...
1
vote
2answers
947 views

How to create a bootable redundant Debian system with a 3 or 4 (or more) disk software raid10?

How do I create a Debian system which is bootable, has a software raid10 and will still boot when I take out one or more (bootable) disks? I would like to use as few disks as possible, preferably 3 or ...
8
votes
2answers
11k views

Running out of memory running fsck on large filesystems

I look after an old Debian linux box (running etch) with only 512 MB of RAM, but a lot of external storage attached. One ext3 filesystem is 2.7 TB in size, and fsck can't check it, because it runs ...
89
votes
8answers
77k views

How can I run Debian stable but install some packages from testing?

Say you're running a server and you don't want to upgrade to Testing (Squeeze) from Stable (Lenny) to just install a required package or two. What's the best way of installing only certain packages ...
44
votes
12answers
34k views

How much SWAP space on a high memory system?

How should I decide what size to make my swap size on a new linux machine (Debian) with a reasonably large amount of Ram (2-4 GB)? Do I really need swap space defined?
10
votes
7answers
10k views

Best way to do Subversion backups?

What is the best way to do Subversion backups (on a Debian based server). Is it to use svnadmin? svnadmin dump /path/to/reponame > reponame.dump Or maybe just to tar the dir where the ...
25
votes
2answers
12k views

Can someone clarify Ubuntu (Debian) dist-upgrade for me?

I've got an Ubuntu 8.04 LTS server. There are several packages which are "kept back" ("the following updates have been kept back:") when I do an apt-get upgrade. It's my understanding that I can do ...
34
votes
9answers
56k views

How do I get apt-get to ignore some dependencies?

How do I make apt-get ignore some dependencies? For example, I wanted to install mailx so I can use it to send email from cron scripts/report-generating tools. However, installing mailx also installs ...
10
votes
7answers
3k views

How can I delete all files from a directory when it reports “Argument list too long”

I have a directory with a couple hundred thousand files in it. I want to delete all the files, but rm * -f reports: "argument list too long" What is the best way to clear out this directory?
7
votes
2answers
2k views

How can I install packages without starting their associated services?

As you're probably aware, by default when you install a package on a Debian or Ubuntu based system, if the package contains a service, that service will generally be enabled and started automatically ...
9
votes
6answers
5k views

How can I log users' bash commands?

I'm running a debian etch server where users will be logging into (hopefully) a chroot jail through ssh. How can I have the commands they execute logged in a way they cannot delete, nor prevent?
10
votes
7answers
2k views

Disable prompts while installing a Debian package

How can i disable totally the prompts that appear while installing a Debian package, i've used all the options that i've found but there are some packages that are still prompting. I'm using this ...
29
votes
4answers
18k views

automate dpkg-reconfigure tzdata

I'm using puppet to admin a cluster of debian servers. I need to change the timezone of each machine on the cluster. The proper debian way to do this is to use dpkg-reconfigure tzdata. But I can ...
14
votes
2answers
7k views

What is the difference between sudo -i and sudo su -

What is the difference between commands sudo -i and sudo su -? Are they the same?
7
votes
3answers
3k views

Debian - Port 80 is blocked, but I don't know by what

I can't make lighttpd listen to port 80. ~# /etc/init.d/lighttpd start Starting web server: lighttpd2013-03-16 23:15:02: (network.c.379) can't bind to port: 80 Address already in use failed! ...
14
votes
5answers
21k views

How do I change Exim4's primary_hostname on a Debian box?

Some remote SMTP server I am trying to deliver mail to refuses to accept the HELO from my server: 504 5.5.2 <localhost>: Helo command rejected: need fully-qualified hostname Apparently, my ...
9
votes
3answers
5k views

High load average, low cpu

My server has slowed down, and I don't know why. Print from top: top - 14:32:50 up 639 days, 6:30, 1 user, load average: 67.93, 70.63, 79.85 Tasks: 245 total, 1 running, 244 sleeping, 0 ...
4
votes
4answers
3k views

Debian Squeeze ip6tables setup

I am setting up a firewall for ipv6 on Debian Squeeze. It is a webserver, so I think the only port that need to be open to the world for ipv6 is 80. This is what I have: *filter :INPUT DROP [0:0] ...
6
votes
2answers
2k views

Confused about alias_maps and virtual_alias_maps

I have already re-read the docs on this as well as other posts here and this is still very unclear to me. I have been testing various things to understand the difference between alias_maps and ...
6
votes
2answers
3k views

Debian 'ignores' /etc/network/if-pre-up.d/iptables

I want my iptables rules to automatically be loaded on startup. According to the wiki on Debian this can be done by placing a script with the name iptables in /etc/network/if-pre-up.d/ So I did, this ...
2
votes
7answers
9k views

Why am I getting “write queue file: No space left on device” from postfix when there's 5GB of free space on disk?

It started happening today... all of a sudden, no apparent reason! Here's the output from df: assp:~# df -k Filesystem 1K-blocks Used Available Use% Mounted on /dev/simfs ...
56
votes
9answers
68k views

How can I export the privileges from MySQL and then import to a new server?

I know how to export/import the databases using mysqldump & that's fine but how do I get the privileges into the new server. For extra points, there are a couple of existing databases on the new ...
35
votes
7answers
42k views

What is the debian-sys-maint MySQL user (and more)?

I have been bitten several times by the 'debian-sys-maint' user that is installed by default on the mysql-server packages installed from the Ubuntu repositories. Generally what happens is I pull a ...
21
votes
8answers
5k views

automated linux deployment and config management at small scale - is it worth it?

I'm about to deploy ~25 servers running Debian. The machines will have different roles - web servers, Java appservers, proxies, MySQL boxes. The environment will probably not grow much in the future - ...
11
votes
7answers
23k views

Debian: Too many open files

I have long running process at Debian. At some point in throw an error "Too many open files". ulimit -a shows open files (-n) 1024 I wish to increase number of open ...
8
votes
7answers
4k views

How to perform cron jobs failover?

Using two Debian servers, I need to setup a strong failover environment for cron jobs that can be only called on one server at a time. Moving a file in /etc/cron.d should do the trick, but is there ...
18
votes
6answers
56k views

Run a shell script as a different user

What's a good way of running a shell script as a different user. I'm using Debian etch, and I know which user I want to impersonate. If I was doing it manually, I would do: su postgres ...
9
votes
5answers
4k views

Boot Debian while RAID array is degraded

Recently, I came across Ubuntu Server install. During install, it asked me whether or not to allow booting system from degraded RAID array (probably because I installed system onto RAID1 /dev/md0 ...
8
votes
5answers
4k views

Securely restrict access to a private Debian repository

I was looking for a method to restrict access to a private Debian repository and be able to authenticate to it non-interactively (i.e. using a script) The most useful article I found if actually one ...
6
votes
4answers
5k views

Check integrity of Debian system after possible rootkit?

I have a system that was possibly rootkited (the IRC bot was installed and +ai attributes were set on /usr/bin, /usr/sbin, /bin, /sbin). The IRC bots were deleted and system was upgraded to 5.0.4 from ...
5
votes
1answer
2k views

Bind process or user to specific IP (Linux)

I have 3 non-root users on my server, and I want to give to each of them the different IP addresses (I have multiple IPs on one network inteface). For example, user1 will have 192.168.1.2, user2 - ...
6
votes
6answers
24k views

Downgrade PHP 5.4 to 5.3 in Debian

I had to do a Debian dist-upgrade on my server... in the process, PHP got upgraded to 5.4. We use ioncube which only supports up to 5.3 atm, and I'm having some trouble finding how to downgrade to ...
6
votes
1answer
6k views

debconf: DbDriver “config”: /var/cache/debconf/config.dat is locked by another process

I ran apt-get upgrade on my debian/testing system and now I get the error above. How can I fix this? shell transcript follows: 136 upgraded, 0 newly installed, 0 to remove and 40 not upgraded. 1 not ...
9
votes
4answers
12k views

Can not update Bash on Debian 6.0 (Squeeze)

I can not update Bash on a Debian 6.0 (Squeeze) server to get rid of the discovered vulnerability: bash --version GNU bash, version 4.1.5(1)-release (x86_64-pc-linux-gnu) apt-get update apt-get ...
5
votes
6answers
3k views

In Linux/Debian, did the passwords (/etc/passwd) ever been stored as plain text?

Someone is telling me so and I have some doubt but I can't find any information on the web.
5
votes
2answers
8k views

How to completely remove a package in Debian?

I tried to use this: aptitude remove denyhosts And it seemed successfully but after a reboot after I use: ps aux | grep "denyhosts" I see denyhosts is still loaded after startup. So what am I ...
3
votes
4answers
8k views

Why does the $PATH of an ssh remote command differ from that of an interactive shell?

I have a user that has made no modifications to the $PATH in any dot-files: it is exactly the system default setting. From a login shell: $ ssh example.com user@example.com:~$ cat /tmp/hello.hs ...
8
votes
4answers
37k views

MySQL keeps crashing: InnoDB: Unable to lock ./ibdata1, error: 11

I have a simple webserver (Debian 6.0 x86, DirectAdmin with 1 GB of memory and still 10 GB free space, mySQl version 5.5.9), however the mySQL server keeps crashing and I need to kill all mySQL ...
5
votes
1answer
431 views

How should I create a local fork of a debian package?

I wish to maintain a local fork of a debian package. I need to patch a bug which will eventually be fixed in the official package, but not for some time. How do I create a .deb package, and how do I ...
5
votes
5answers
8k views

iptables port forwarding on debian

I'm trying to setup a simple port forwarding firewall and I can't make the basic non-firewall configuration to work. I have setup the iptables script as follows #!/bin/sh # interfaces LAN="eth1" ...
4
votes
8answers
1k views

debian mysql auto daily backuping

I need to backup my Mysql database daily under a Debian server. I know there are plenty of scripts out there but my need is backing up daily as a sql file and putting each backup seperately(maybe the ...
3
votes
1answer
513 views

Changing time or offsetting it in OpenVZ contained server

I am trying to run a VPS, a Debian box contained in an OpenVZ container. Obviously, I cannot use time --set or any such command, as the time must be set via the parent node. The owner of the parent ...
3
votes
4answers
832 views

How do you handle updates on a server?

I am really lazy I will give you guys this ;) but I have ~25 virtual machines running on xen. I really like xen and everything but now comes the tricky part.. I don't really feel like going through 25 ...
2
votes
1answer
2k views

startpar process left hanging when starting processes from rc.local or init.d

I have a peculiar issue when starting ongoing(service-like) processes from either full blown init.d script (SysV style) or a simple one-line call from rc.local file like so: su someuser -c ...
2
votes
3answers
869 views

Am I getting DDoSed, and what should I about it?

At the moment my server is lagging pretty bad, and it crashes. It's a dedicated server which has run completely fine last two days. What does this command do? netstat -n|grep :80|cut -c 45-|cut -f 1 ...