[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

get custom user set during the installation



Hello all,

I'm trying to retrieve the custom user that was set during the installation
with a script (during the finish-install.d phase).

The code that I'm using is:

#!/bin/sh
USER=$(getent passwd 1000 | sed -e 's/\:.*//')
if [ "$USER" != "user" ] ; then
 in-target rm -rf /home/user/
 in-target sed -i "s/home\/user/home\/$USER/g" /etc/smb.conf
 in-target sed -i "s/USER=user/USER=$USER/g" /etc/default/sabnzbdplus
fi


This doesn't seem to work. The value returned is empty. Anyone of you know how to retrieve the custom user that was entered during the installation?

Regards,

Piethein Strengholt

Reply to: