Re: %post question adding real user name

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

 



On Wed, 22 Oct 2003, Alexander Rau (private) wrote:

>I would like to add a real user name by running the following script in
>the %post section but I can's get it to work. Any ideas why?
>
>dialog --title "Enter Name" --inputbox "Please enter your name" 8 60
>2>/tmp/name.$$
>
>SEL=$?
>
>NA2=`cat /tmp/name.$$`
>case $SEL in
>  0)  chfn -f $NA2 username ;;

If my name is "Philip Rowlands" (which it is), this line reads:
chfn -f Philip Rowlands username
which probably tries to set the user "Rowlands" to have the full name
"Philip", if it works at all.

Try:

chfn -f "$NA2" username

or just replace the whole thing with:

NAME=`dialog --title 'Enter Name' --inputbox 'Please enter your name' 8 60 2>&1` \
	&& chfn -f "$NAME" username


Cheers,
Phil




[Index of Archives]     [Red Hat General]     [CentOS Users]     [Fedora Users]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]

  Powered by Linux