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

learn more… | top users | synonyms

148
votes
3answers
97k 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 ...
4
votes
1answer
1k 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 ...
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 ...
52
votes
5answers
3k views

How should an IT department choose a Linux distribution: Technical reasons

There is a lot of community feeling about what Linux distributions are appropriate for production server environments and what aren't. Some of this is based on the availability of commercial support. ...
3
votes
4answers
641 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 ...
12
votes
5answers
60k 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 ...
22
votes
7answers
22k 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
1answer
665 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 ...
64
votes
13answers
31k views

What steps do you take to secure a Debian server?

I am installing a Debian server which is connected directly to the Internet. Obviously I want to make it as secure as possible. I would like you guys/gals to add your ideas to secure it and what ...
8
votes
2answers
10k 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 ...
41
votes
12answers
29k 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
8k 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 ...
23
votes
2answers
11k 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 ...
25
votes
9answers
43k 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 ...
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?
8
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 ...
23
votes
4answers
15k 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
4k 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?
9
votes
3answers
4k 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 ...
13
votes
5answers
17k 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 ...
6
votes
2answers
2k 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 ...
73
votes
7answers
62k 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 ...
47
votes
9answers
57k 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 ...
31
votes
7answers
34k 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 ...
20
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. machines will have different roles - web servers, java appservs, proxies, mysql boxes. environment will probably not grow much in the future - maybe 2-5 ...
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?
10
votes
7answers
20k 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 ...
7
votes
5answers
3k 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 ...
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 - ...
14
votes
6answers
42k 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 ...
6
votes
4answers
18k 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 ...
5
votes
1answer
5k 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 ...
5
votes
4answers
4k 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 ...
9
votes
4answers
11k 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
7k 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 ...
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
2answers
96 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 ...
4
votes
1answer
397 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 ...
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
4answers
6k 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 ...
3
votes
4answers
767 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
3answers
832 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 ...
1
vote
1answer
72 views

Disabling damaged RAID 1 to read from healthy HDD

One of the HDDs in my software RAID 1 on a dedicated server is damaged. The customer support is slow to respond. I would like to transfer all data I need to another server, but file access is ...
1
vote
2answers
1k views

executing a sh script from the cron

I have a test.sh script #!/bin/sh php /home/v/file.php sh /root/x/some.sh when I execute the file as root from command line it works. sh /home/v/test.sh when I set it to crontab -e (is the root ...
0
votes
1answer
10k views

Server not responding to SSH and HTTP but ping works

I requested an hard reboot because none of ssh and http worked. Ping worked normally. Which logs should i check to understand what was the problem? Thanks! (debian 6 on lamp) Edit: my memory and ...
7
votes
4answers
431 views

How to know what user belongs to what ip on debian

is there a way to get an overview of users logged in on my server and the ip they are connecting from ? I have the IP already, I want the user that is associated with it :)
6
votes
5answers
5k views

Find (and kill) old processes

Basically I need to be able scan the process tree and find processes that match a certain name and started running more than a week a go. Once I have them, I need to kill them. All the processes are ...
5
votes
5answers
7k views

Debian Squeeze Hyper-V Drivers

I have a fresh Debian 6.0.0 (Squeeze) server running on Hyper-V and I'm trying to get the synthetic drivers loaded into the kernel (2.6.32-5-amd64). The research I've done says that the Linux ...