[prev in list] [next in list] [prev in thread] [next in thread] 

List:       linux-fai
Subject:    Re: Kernel panic - FAI 4.1.1
From:       Rui Teixeira <ruiteixeira18 () gmail ! com>
Date:       2014-05-15 17:18:46
Message-ID: CAJPDOD+Q2B3s9fXmQzYzgoabbTJKhhxEJPFurXn93ieHWH5unQ () mail ! gmail ! com
[Download RAW message or body]

Apparently you were right, postgresql, for some reason, was picking UID 103
to use as "creator" of the installation. I've change that to the user that
I want and it work fine now. I'm haveing a problem with SSL certificates to
use TCP ove SSL but this is a postgresql question and not a FAI question,
so I think we are done for now.

Thank you very much for all of your responses, I am very grateful


2014-05-15 16:48 GMT+01:00 Toomas Tamm <tt-fai@kky.ttu.ee>:

> Could it be that the postgres package assumes some specific numeric UID,
> which is already taken? Check your /etc/passwd, /etc/shadow
> and /etc/group for anything suspicious, such as duplicate UID or GID
> values. Also have a look at the preinst and postinst scripts of the
> package to see how the users and groups are handled (perhaps created)?
>
> I have a hook for FAI, hooks/instsoft.YKI (all our machines belong to
> the "YKI" class, named after the subdivision where I work). There I
> create several users with fixed UID's and GID's, to enforce uniform
> values for these across all our computers. Some examples:
>
> if [ "$FAI_ACTION" = "install" ] ; then
>
>     # This user is for the logfile copy/analyze facility.
>     $ROOTCMD adduser --home /var/log --shell /bin/false --uid 201
> --ingroup adm --gecos "For copying logs" --disabled-password
> --no-create-home yki-logs
>
>     # A more sophisticated case where the user may or may not exist
> already. $MYSQL_SHELL may be /bin/sh or /bin/false depending on the host
>     $ROOTCMD grep mysql /etc/passwd > /dev/null && $ROOTCMD usermod --uid
> 208 mysql && $ROOTCMD groupmod --gid 208 mysql
>     $ROOTCMD grep mysql /etc/passwd > /dev/null || $ROOTCMD adduser --home
> /var/lib/mysql --shell $MYSQL_SHELL --uid 208 --gecos "MySQL server"
> --disabled-password --no-create-home mysql
>
> fi
>
> Toomas
>
> On Thu, 2014-05-15 at 16:28 +0100, Rui Teixeira wrote:
> > Ok, it worked to download and install postgresql, but now I've a
> > strange problem. I have 1 user 'xpto' and 'root'. Installation and
> > boot were ok, but now I can't start postgresql because he must be
> > started by sshd user (?!?!). I've checked and all configuration files
> > belongs do sshd postgres, i.e.:
> > # ls -l /et/postgresql/9.3/main
> > -rw-r--r-- 1 sshd postgres   315 Main 15:14 environment
> > ...
> >
> >
> > I don't understand, where I can force to create and use user 'xpto' to
> > be the owner and be able to start services on the sysytem?
>
> >
>

[Attachment #3 (text/html)]

<div dir="ltr">Apparently you were right, postgresql, for some reason, was picking \
UID 103 to use as &quot;creator&quot; of the installation. I&#39;ve change that to \
the user that I want and it work fine now. I&#39;m haveing a problem with SSL \
certificates to use TCP ove SSL but this is a postgresql question and not a FAI \
question, so I think we are done for now.<br> <div><br></div><div>Thank you very much \
for all of your responses, I am very grateful</div></div><div \
class="gmail_extra"><br><br><div class="gmail_quote">2014-05-15 16:48 GMT+01:00 \
Toomas Tamm <span dir="ltr">&lt;<a href="mailto:tt-fai@kky.ttu.ee" \
target="_blank">tt-fai@kky.ttu.ee</a>&gt;</span>:<br> <blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Could it be \
that the postgres package assumes some specific numeric UID,<br> which is already \
taken? Check your /etc/passwd, /etc/shadow<br> and /etc/group for anything \
suspicious, such as duplicate UID or GID<br> values. Also have a look at the preinst \
and postinst scripts of the<br> package to see how the users and groups are handled \
(perhaps created)?<br> <br>
I have a hook for FAI, hooks/instsoft.YKI (all our machines belong to<br>
the &quot;YKI&quot; class, named after the subdivision where I work). There I<br>
create several users with fixed UID&#39;s and GID&#39;s, to enforce uniform<br>
values for these across all our computers. Some examples:<br>
<br>
if [ &quot;$FAI_ACTION&quot; = &quot;install&quot; ] ; then<br>
<br>
      # This user is for the logfile copy/analyze facility.<br>
      $ROOTCMD adduser --home /var/log --shell /bin/false --uid 201 --ingroup adm \
--gecos &quot;For copying logs&quot; --disabled-password --no-create-home \
yki-logs<br> <br>
      # A more sophisticated case where the user may or may not exist already. \
                $MYSQL_SHELL may be /bin/sh or /bin/false depending on the host<br>
      $ROOTCMD grep mysql /etc/passwd &gt; /dev/null &amp;&amp; $ROOTCMD usermod \
--uid 208 mysql &amp;&amp; $ROOTCMD groupmod --gid 208 mysql<br>  $ROOTCMD grep mysql \
/etc/passwd &gt; /dev/null || $ROOTCMD adduser --home /var/lib/mysql --shell \
$MYSQL_SHELL --uid 208 --gecos &quot;MySQL server&quot; --disabled-password \
--no-create-home mysql<br> <br>
fi<br>
<span class="HOEnZb"><font color="#888888"><br>
Toomas<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Thu, 2014-05-15 at 16:28 +0100, Rui Teixeira wrote:<br>
&gt; Ok, it worked to download and install postgresql, but now I&#39;ve a<br>
&gt; strange problem. I have 1 user &#39;xpto&#39; and &#39;root&#39;. Installation \
and<br> &gt; boot were ok, but now I can&#39;t start postgresql because he must \
be<br> &gt; started by sshd user (?!?!). I&#39;ve checked and all configuration \
files<br> &gt; belongs do sshd postgres, i.e.:<br>
&gt; # ls -l /et/postgresql/9.3/main<br>
&gt; -rw-r--r-- 1 sshd postgres    315 Main 15:14 environment<br>
&gt; ...<br>
&gt;<br>
&gt;<br>
&gt; I don&#39;t understand, where I can force to create and use user &#39;xpto&#39; \
to<br> &gt; be the owner and be able to start services on the sysytem?<br>
<br>
&gt;<br>
</div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic