Kernel panic - FAI 4.1.1

Toomas Tamm tt-fai at kky.ttu.ee
Thu May 15 17:48:50 CEST 2014


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?

> 


More information about the linux-fai mailing list