LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 02-29-2008, 12:40 PM   #1
eater
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Rep: Reputation: 0
System usernames versus user numbers -- incompatibility?


I'm running Debian etch and I'm perplexed about the difference between usernames and user numbers. When I look at ps -aux, most of the processes are identified by their username:

Code:
www-data 16793  0.0  2.9  43052 26584 ?        S    Feb24   4:57 /usr/sbin/apache
mysql     1663  0.0  0.6 111588  5596 pts/2    Sl   Feb23   0:15 /usr/sbin/mysqld
but a few of them, notably Exim, are identified by their user number:
Code:
109       7580  0.0  0.1  11624  1604 ?        Ss   13:01   0:00 /usr/sbin/exim4 -bd -q30m
In /etc/passwd, there is a user called Debian-exim, and its user number is 109. What decides whether the name or the number will be used to identify the process?

This is not idle curiosity, because when Exim is running as user 109, it doesn't have permission to access files belonging to Debian-exim! That is a problem. How can I fix it?

Incidentally, chown doesn't seem to care about the difference between names and numbers:
Code:
root /etc/exim4 #ls -l passwd.client

-rw-r--r-- 1 root Debian-exim 205 Feb 28 12:49 passwd.client

root /etc/exim4 #chgrp 109 passwd.client

root /etc/exim4 #ls -l passwd.client

-rw-r--r-- 1 root Debian-exim 205 Feb 28 12:49 passwd.client
 
Old 02-29-2008, 03:09 PM   #2
MQMan
Member
 
Registered: Jan 2004
Location: Los Angeles
Distribution: Slack64 13.37
Posts: 535

Rep: Reputation: 36
I seem to remember that ps displays the number when the name is longer than a certain length.

Cheers.
 
Old 02-29-2008, 05:18 PM   #3
jlinkels
Senior Member
 
Registered: Oct 2003
Location: Bonaire
Distribution: Debian Lenny/Squeeze/Wheezy/Sid
Posts: 4,053

Rep: Reputation: 484Reputation: 484Reputation: 484Reputation: 484Reputation: 484
Dunno when ps display numbers or names, but it is true that it doesn't matter whether you use names or numbers. There are fully equal. (Why the two are different than???)

Shit happens when you use YP, or you are mounting from another computer and the name/number combinations are different from one machine to the other. I thought numbers had preference over names in such cases.

jlinkels
 
Old 02-29-2008, 05:39 PM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Give a specific example of failed access. it may not be permissions - does Debian use SELinux?
 
Old 03-01-2008, 10:53 AM   #5
eater
LQ Newbie
 
Registered: Feb 2008
Posts: 2

Original Poster
Rep: Reputation: 0
A specific example is that suddenly, starting the day before yesterday, exim can't read this file:

-rw-r----- 1 root Debian-exim 205 Dec 20 17:40 passwd.client

But if I make it world-readable (0644), suddenly exim can read it again. Exim is running as user 109, which is Debian-exim.

I can reproduce the problem easily with a chmod 0640 on that file; exim tells me "failed in cram_md5 authenticator: failed to open /etc/exim4/passwd.client for linear search: Permission denied (euid=109 egid=42)"

And yes, user 109 is a member of the Debian-exim group.

Is this a symptom of some other problem that I'm misunderstanding, perhaps?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
System numbers? gymnart Linux - Software 2 12-22-2007 10:34 AM
How to increase the Linux User numbers m_shroom General 22 12-14-2006 08:18 AM
Creating a user using numbers as login petkovsky Red Hat 3 09-21-2006 06:21 AM
user and group numbers Furlinastis Linux - General 3 05-07-2006 05:15 PM
SAMBA - Windows user aliases to linux usernames? Bungo2000 Linux - Software 4 06-27-2003 04:16 AM


All times are GMT -5. The time now is 06:03 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration