can not start SVNserve

David Weintraub qazwart at gmail.com
Sat Dec 20 06:02:17 PST 2008


So, just to clarify...

On one machine:

    $ su svn

Will change you to the "svn" user while on another machine:

    $ su svn

Will output:

su: Sorry

The problem would be the configuration of the two machines and not a
Subversion issue. You may want to try the BSD list about why you have
these two different behaviors on your machines. I would also look at
the manpage of the "su" command to see if there is something that
could be affecting the behavior of the "su" command.

Take a look at the "su" command in the startup script. It probably
looks something like:

su svn -c $path_to_svnserve/svnserve -r $SVN_REPOS -d

See if you can execute this command on the command line. Also try
putting "set +xv" and "set -xv" around the command inside the shell
script. This puts the shell into verbose and debug mode, so it will
echo all the commands it is executing before executing them. Sometimes
this helps clarify where a problem might be. For example, your
svnserve command might not be in the $PATH to be executed. Or, maybe
an environment variable isn't being defined correctly.

An alternative, try the "sudo" command if it is available on your machine:

$ sudo -u svn $path_to_svnserve_dir/svnserve -r $SVN_ROOT -d

Depending how your sudo command is setup (see /etc/sudo about
configuration), it might ask you for a password, or maybe setup not to
allow you to run the command. The default is to allow the root user to
run all commands without a password.

I've found sudo to work a bit better than "su" in many situations.

On Sun, Dec 14, 2008 at 6:22 AM, KES <kes-kes at yandex.ru> wrote:
> Здравствуйте, David.
>
> I have
> home# uname -a
> FreeBSD home.kes.net.ua 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Aug 12 02:11:24 EEST 2008     kes at kes.net.ua:/usr/obj/usr/src/sys/KES_KERN_v7  i386
> on this machine sveserve startsup normally
>
>>My confusion comes from the output of PW
> home# pw user show svn
> svn:*:1003:1002::0:0:SVN user:/nonexistent:/usr/sbin/nologin
> pw is utility to edit /etc/master.passwd
> home# cat /etc/master.passwd | grep svn
> svn:*:1003:1002::0:0:SVN user:/nonexistent:/usr/sbin/nologin
>
>>showing me that user "svn" is a valid user
> 'svn' user is valid user
>
>
>>Have you tried changing the "svn" user shell to /bin/bash
> telling this:
> .... :/nonexistent:/usr/sbin/nologin
> I point that anyone can not use this user to login to system. But
> because of 'svn' is valid system user process can low his right to
> 'svn' user
>
> On this HOME machine when I try run svnserve it is runned despite on 'su svn'
> can not login me:
> home# su svn
> This account is currently not available.
> home# /usr/local/etc/rc.d/svnserve start
> Starting svnserve.
> home# ps ax|grep svn
> 34209  ??  Ss     0:00,00 /usr/local/bin/svnserve -d --listen-port=3690 -r /usr
> 34211  p0  S+     0:00,00 grep svn
>
> But on other machine with same user I can not start svnserver
> kes# pw user show svn
> svn:*:1005:1005::0:0:SVN user:/nonexistent:/usr/sbin/nologin
> kes# /usr/local/etc/rc.d/svnserve start
> Starting svnserve.
> su: Sorry
>
>
> kes# pw user mod svn -s /bin/bash
> kes# pw user show svn
> svn:*:1005:1005::0:0:SVN user:/nonexistent:/bin/bash
> kes# /usr/local/etc/rc.d/svnserve start
> Starting svnserve.
> su: Sorry
>
>
> DW> Have you tried changing the "svn" user shell to /bin/bash and see if
> DW> your startup script is working.
> the differences between this machines only are next:
> home# svnserve --version
> svnserve, version 1.5.1 (r32289)
>   compiled Aug  3 2008, 00:10:41
> home# uname -a
> FreeBSD home.kes.net.ua 7.0-STABLE FreeBSD 7.0-STABLE #0: Tue Aug 12 02:11:24 EEST 2008     kes at kes.net.ua:/usr/obj/usr/src/sys/KES_KERN_v7  i386
>
> and
> kes# svnserve --version
> svnserve, version 1.5.2 (r32768)
>   compiled Oct  8 2008, 21:55:55
>
> kes# uname -a
> FreeBSD kes.net.ua 7.1-PRERELEASE FreeBSD 7.1-PRERELEASE #: Sun Nov 23 17:19:12 EET 2008     kes at home.kes.net.ua:/usr/obj/usr/src/sys/KES_KERN_v7  i386
>
>
> DW> It would be helpful if you explained your system, setup, what you were
> DW> doing, and the results instead of simply showing us the output of a
> DW> couple of commands. It is hard to figure out exactly what you are
> DW> trying to do and what you have done.
> I try to run 'svnserve'. I just install svnserver and add user svn to
> run svnserve under. I do same things on 'kes' as on 'home' machine.
>
>
>
> Вы писали 14 декабря 2008 г., 7:22:39:
>
> DW> I'm a bit confused by what you're asking. I believe PW is a command
> DW> for editing groups and users on BSD, but I've never really used it.
>
> DW> My confusion comes from the output of PW. A typical user line has
> DW> seven fields, your output shows 11 fields. I am assuming that you're
> DW> showing me that user "svn" is a valid user. However, the shell is
> DW> setup to be /usr/sbin/nologin (which I assume is similar to setting
> DW> the shell to /etc/false).
>
> DW> Doing a "su svn" won't log you in becuase of the shell. I don't have
> DW> the /usr/local/etc/rc.d/svnserve script in front of me, so I can't
> DW> tell you what it is doing, but I suspect that since the "su svn"
> DW> command doesn't work, the script also does a "su svn -c $command", and
> DW> that is failing since your "svn" user is set to the "nologin" shell.
>
> DW> Have you tried changing the "svn" user shell to /bin/bash and see if
> DW> your startup script is working.
>
> DW> At least, once you've changed your shell to "/bin/bash", you'll be
> DW> able to sign on as user "svn", and try to start up the "svnserve"
> DW> program manually. Then, we can determine if the problem is with
> DW> "svnserve" or with your startup script.
>
> DW> It would be helpful if you explained your system, setup, what you were
> DW> doing, and the results instead of simply showing us the output of a
> DW> couple of commands. It is hard to figure out exactly what you are
> DW> trying to do and what you have done.
>
> DW> In theory, your computer is doing exactly what you told it to do -- no
> DW> more, no less, and thus there is no problem. Everything is working
> DW> perfectly as programmed.
>
> DW> What we need to know is what you *WANTED* it to do. Then we can figure
> DW> out how to get your system setup to do just that.
>
> DW> On Fri, Dec 12, 2008 at 3:13 AM, KES <kes-kes at yandex.ru> wrote:
>>> Здравствуйте, Users.
>>>
>>> What is wrong?
>>> kes# pw user show svn
>>> svn:*:1005:1005::0:0:SVN user:/nonexistent:/usr/sbin/nologin
>>> kes# su svn
>>> su: Sorry
>>> kes# /usr/local/etc/rc.d/svnserve start
>>> Starting svnserve.
>>> su: Sorry
>>>
>>>
>>> --
>>> С уважением,
>>>  KES                          mailto:kes-kes at yandex.ru
>>>
>>> ------------------------------------------------------
>>> http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=983277
>>>
>>> To unsubscribe from this discussion, e-mail: [users-unsubscribe at subversion.tigris.org].
>>>
>
>
>
>
>
>
> --
> С уважением,
>  KES                          mailto:kes-kes at yandex.ru
>
>



-- 
--
David Weintraub
qazwart at gmail.com

------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=984168

To unsubscribe from this discussion, e-mail: [users-unsubscribe at subversion.tigris.org].


More information about the freebsd-questions mailing list