[Kroupware] Re: Understanding QIM's su to root

Bo Thorsen bo at sonofthor.dk
Wed Aug 6 09:17:53 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday 06 August 2003 01:51, Morten Christensen wrote:
> I try to install kolab though my skills is far below the
> system-administrators in your target-group.
>
> In part 6 of the QIM the steps are:
> 1. cd /kolab/RPM/SCR/PACKAGE
> 2. rpm -bb PACKAGE.spec
> 3. su #
> 4. /kolab/bin/rpm -Uhv
> /kolab/RPM/PKG/PACKAGE-nnn-nnn.ix86-linux-2.4-kol.rpm
>
> When I follow the QIM, step 1 and 2 of the first PACKAGE are done as
> user kolab from part 5.
> Do you expect me to change back to user kolab before step 1 every time
> I start on a new PACKAGE and run "rpm -bb" as user kolab ?

Yes.

What I did was to write this small script:

#!/bin/bash

su -c "cd /kolab/RPM/SRC/$1 && rpm -bb $1.spec" - kolab
/kolab/bin/rpm -Uhv /kolab/RPM/PKG/$1-*.rpm

And then I as root run

for i in (insert packages here); do
  build $i
done

For the later parts, where you have to give it options, I have two open 
windows. One for root and one for user kolab. That way I don't have to su 
all the time.

And before anyone suggests it, I'm *not* setting up sudo on my server. 
(Even though something is supposed to be secure, it's always more secure 
to not use it at all.)

If you don't want to do all the typing, you could download one of the 
scripts that have been mailed to this mailing list. Search the archives 
for a couple of them.

Bo.

- -- 

     Bo Thorsen                 |   Praestevejen 4
     Senior Software Engineer   |   5290 Marslev
     Klarälvdalens Datakonsult  |   Denmark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2-rc1-SuSE (GNU/Linux)

iD8DBQE/MJ2SmT99lwfUS5IRAvR3AKDqjGDWXDN3GaNmqG1QsNZd0LroigCfc2au
QlF9k+H2LC7E6F626eGLmIo=
=c/uN
-----END PGP SIGNATURE-----


More information about the Kroupware mailing list