Gentoo Archives: gentoo-user

From: Jose Gonzalez Gomez <jgonzalez.openinput@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Weird permission problem trying to start Dante SOCKS server
Date: Mon, 02 Jan 2006 15:04:09
Message-Id: 306bf010601020657r44b690e9s@mail.gmail.com
1 Hi there,
2
3 I'm facing a weird problem that seems to be related somehow to some
4 permission problem I can't identify. I'm trying to use the Dante SOCKS
5 server, that has three different users you may specify at its configuration
6 file. They should be the sockd user (id 101), but if I use it, I get the
7 following error while checking the configuration file (this error prevents
8 the service from starting):
9
10 proxy ~ # /usr/sbin/sockd -V
11 Jan 2 16:45:31 (1136216731) sockd[0]: socks_seteuid(): old: 0, new: 101
12 Jan 2 16:45:31 (1136216731) sockd[0]: socks_reseteuid(): current: 101, new:
13 0
14 Jan 2 15:45:31 (1136216731) sockd[0]: socks_reseteuid(): getpwuid(0):
15 Permission denied (errno = 13)
16 Jan 2 15:45:31 (1136216731) sockd[0]: sockdexit(): terminating
17
18
19 After googling around I found that getpwuid is a function that returns the
20 information associated with an entry in /etc/passwd for the given uid, and
21 socks_reseteuid seems to be the function used by Dante to switch from on
22 user to another one. So it seems when Dante runs as user 101 (sockd) the
23 call to getpwuid is failing due to a permission problem. I've checked users,
24 permissions on /etc/passwd, and can't find any reason why this would be
25 failing so any help would be greatly appreciated.
26
27 More info:
28 proxy ~ # id root
29 uid=0(root) gid=0(root)
30 groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)
31 proxy ~ # id sockd
32 uid=101(sockd) gid=2(daemon) groups=2(daemon)
33 proxy ~ # ls -l /etc/passwd
34 -rw-r--r-- 1 root root 1772 Dec 20 15:01 /etc/passwd
35 proxy ~ # cat /etc/passwd | grep root
36 root:x:0:0:root:/root:/bin/bash
37 operator:x:11:0:operator:/root:/bin/bash
38 proxy ~ # cat /etc/passwd | grep sockd
39 sockd:x:101:2:added by portage for dante:/etc/socks:/bin/false
40
41 Any ideas????
42
43 TIA, best regards
44 Jose