Re: Re[2]: can not start SVNserve

2008-12-14 Thread David Weintraub
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  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 k...@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 k...@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 k...@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

Re: Re[2]: can not start SVNserve

2008-12-14 Thread Polytropon
On Sun, 14 Dec 2008 12:58:55 +0100 (CET), Wojciech Puchar 
 wrote:
> > 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
> try to change directory to existent

(1) What's /bin/bash? Check existing shell.

(2) As you said: Check existing directory.

(3) Regarding su, check for wheel group inclusion.

-- 
Polytropon
>From Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"