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

learn more… | top users | synonyms

149
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 ...
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 ...
65
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 ...
52
votes
7answers
69k views

How to determine JAVA_HOME on Debian/Ubuntu?

On Ubuntu it is possible to have multiple JVMs at the same time. The default one is selected with update-alternatives. But this does not set the JAVA_HOME environment variable, due to a debian policy. ...
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. ...
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 ...
46
votes
9answers
11k views

What's the difference between apt-get and aptitude?

I don't get why there are two different programs in a minimal install to install software. Don't they do the same thing? Is there a big difference? I have read everywhere to use aptitude over apt-get ...
41
votes
7answers
47k views

mysqldump to a tar.gz

Usually after dumping a MySQL database with mysqldump command I immediately tar/gzip the resultant file. I'm looking for a way to do this in one command: So from this: mysqldump dbname -u root -p ...
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?
38
votes
9answers
4k views

How Often Should I Update our Linux Server?

I am responsible for managing both our production server (mail, web, database are all on one server) and our test server. Both are built on Debian. However as I am very new to system administration, I ...
36
votes
3answers
9k views

How to remove the “installed manually” flag and revert to “automatically installed” with apt-get?

To compile something, I needed the zlib1g-dev package to be installed so I launched an apt-get install zlib1g-dev. apt-get informed me nicely that the package was already auto-installed because of ...
33
votes
5answers
15k views

What's the difference between 'useradd' and 'adduser'?

What's the difference between useradd and adduser? When/why should I prefer using one or the other?
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 ...
30
votes
5answers
5k views

How to check for modified config files on a Debian system?

How to find all Debian managed configuration files which have been changed from the default?
27
votes
3answers
57k views

How to install/change locale on Debian?

I've written a web application for which the user interface is in Dutch. I use the system's date and time routines to format date strings in the application. However, the date strings that the system ...
26
votes
9answers
10k views

Are configuration management tools (Puppet, Chef) capable of keeping installed packages up to date?

This is probably a simple question for those of you already running configuration management tools. Are configuration management tools such as Puppet or Chef the right approach for keeping installed ...
26
votes
6answers
1k views

Top-like tool for IP traffic [closed]

I need to keep watch on how much bandwidth some connections are taking in a server, and I know I have seen a top-like tool for that before. However, I can't remember the name of the tool, and I'm not ...
25
votes
1answer
2k views

ZFS endless resilvering

I have a large (> 100TB) ZFS (FUSE) pool on Debian that lost two drives. As the drives failed, I replaced them with spares until I could schedule an outage and physically replace the bad disks. When ...
25
votes
9answers
44k 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 ...
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 ...
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 ...
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, ...
21
votes
3answers
22k views

Purpose of debian “sites-available” and “sites-enabled” dirs

I'm a noob, please be nice. Can anyone tell me, in a nutshell, what the purpose of these two directories are in Debian? /etc/apache2/sites-enabled /etc/apache2/sites-available I notice that ...
21
votes
3answers
19k views

list all packages from a repository in ubuntu / debian

is there a command to see what packages are available from a certain ppa repository?
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 ...
20
votes
3answers
10k views

List of files installed from apt package

How do I get a list of files that were or will-be installed when I apt-get a package? Conversely, can I find what package(s) caused a particular file to be installed?
20
votes
1answer
14k views

How to update a package using puppet and a .deb file

I am trying to figure out the proper way to update/upgrade a deb package using puppet from a local source deb file. My current config looks like this... class adobe-air-2-0-4 { file { ...
19
votes
2answers
21k views

ia32-libs : Depends: ia32-libs-i386 but it is not installable

I am trying to install ia32-libs (a dependency to build the VirtualBox sources) on my Debian x86_64 box, however it's giving me the error: The following packages have unmet dependencies: ia32-libs : ...
18
votes
5answers
23k views

What is the preferred method to restart networking in Ubuntu and Debian

When I restart the network using: /etc/init.d/networking restart I get this warning: Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces So ...
18
votes
10answers
8k views

Managing upgrades on hundreds of Debian servers

What do you think are the best practices to maintain dozens (if not hundreds) of debian servers up-to-date ? Keeping in mind that : There are groups of servers (i.e identical webservers, DB ...
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 ...
17
votes
20answers
3k views

Why does redhat seem to be so popular in the enterprise world?

Title says it all. For personal usage, I tend to prefer Debian/Ubuntu over Redhat. It's not necessarily that I dislike Redhat (or more specifically CentOS or Fedora) so much as it is that I like ...
17
votes
3answers
40k views

Debian 5.0 (lenny) apt sources fail?

For the past few days, I couldn't update our apt-sources on Debian 5.0 (lenny). I get the following errors. W: Failed to fetch http://ftp.debian.org/debian/dists/lenny/main/binary-amd64/Packages 404 ...
17
votes
8answers
15k views

Should I have to enable automatic update on Debian lenny stable?

I have installed a new Linux Debian lenny server that will be a LAMP and a Subversion server. Should I have to enable automatic updates? If I enable it, I am sure that I have the latest security ...
16
votes
7answers
25k views

Disable a service from starting at all runlevels?

I have a service foo which currently starts at runlevel 3 and above. How can I stop it from doing so, without using update-rc.d foo stop 3 ., which (if I understand it correctly) would turn off the ...
14
votes
4answers
3k views

Give root password for maintenance

After entering shutdown now in terminal I get everything running normally and then: All processes ended withing 2 seconds...done INIT: Going single user INIT: Sending processes the TERM signal ...
14
votes
4answers
922 views

How to store data on a machine whose power gets cut at random

I have a virtual machine (Debian) running on a physical machine host. The virtual machine acts as a buffer for data that it frequently receives over the local network (the period for this data is ...
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 ...
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?
14
votes
2answers
2k views

How to find files in a Debian system not installed or created by dpkg?

I've installed some things manually in the past and would like to weed out all related files. So, I need a way to automatically find all the files (in /usr, for example) that are not included in any ...
13
votes
7answers
1k views

Restore SSH session

I have connected to my server via SSH and created a process, but suddenly my internet connection got disconnected. I know that the process is going on, but how can restore previous session to see the ...
13
votes
5answers
18k 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 ...
13
votes
4answers
5k views

Given a debian source package - How do I install the build-deps?

I have a debian (well technically ubuntu) source package, i.e. the .dsc, the .tar.gz, etc., I want to build this. The dpkg-buildpackage fails, since I don't have all the build dependencies. Normally ...
12
votes
5answers
29k views

How can I list my open ports on Debian?

What is the command to display a list of open ports on a Debian server? I tried netstat -a | egrep 'Proto|LISTEN' but I would like something more specific that actually lists the port number.
12
votes
2answers
855 views

Allow complex sudo command on Debian Linux

I need to allow a specific command on a Debian Linux box for a single user. I've tried this in the /etc/sudoers file: # User privilege specification zabbix ALL=NOPASSWD: /usr/bin/apt-get ...
12
votes
10answers
32k views

Can't start/stop mysql service

Taking over a Debian Etch web server with MySQL running. I usually start, stop and restart msyql using: /etc/init.d/mysql restart For some reason on this set up I get the following: :~# ...
12
votes
2answers
3k views

Why does ntpd listen on so many ports/addresses?

I’ve noticed this for a while, and it’s never made any sense to me: Why does ntpd need to listen on so many addresses? For example, a Debian machine: $ netstat Proto Local Address Foreign Address ...
12
votes
2answers
2k views

Linux/Debian - What does 'pee' in moreutils do?

I recently discovered the 'moreutils' package in Debian (and Ubuntu). It's a collection of convenient unix tools. One of the commands is 'pee'. The man page says: pee is like tee but for pipes. ...
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 ...
11
votes
7answers
24k views

Chown operation not permitted for root

I try to chown the owner of a file to root, but I can't. I'm doing this as root. I get the following message: chown: changing ownership of `ps': Operation not permitted