NI Linux Real-Time Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Not the supervisor

I am trying to install a touch screen driver on the machine, but when I run

sh setup.sh

I get

(I) Check user permission: admin, you are NOT the supervisor.

(E) The root permission is reuquired to run this installer

I am not sure how to install this driver.

0 Kudos
Message 1 of 54
(11,527 Views)

[Edit: see replies below.]

It sounds like you're using the local terminal on a cRIO-903x with the display enabled (if not, please clarify your environment). That terminal logs into "lvuser" by default, which is not a superuser. You can use the "su" utility to become a superuser. On NI Linux RT we normally use the "admin" user for this, so "su admin". The password is configured through the web interface as noted in your manual (see "Setting a System Password"). Once you're logged in as "admin", try your setup script again.

0 Kudos
Message 2 of 54
(4,582 Views)

Hello again, LJHerskowitz!

Can you point us to the touchscreen driver you're using? I have a feeling that it is an issue with the script itself due to the following:

LJHerskowitz wrote:

...

I get

(I) Check user permission: admin, you are NOT the supervisor.

(E) The root permission is reuquired to run this installer

I am not sure how to install this driver.

(emphasis added)

0 Kudos
Message 3 of 54
(4,582 Views)

Good eye Brad. Sounds like the script doesn't think "admin" is a superuser (even though it is). Might require some small change to the script itself.

0 Kudos
Message 4 of 54
(4,582 Views)

Here is the site I got the driver off of

http://home.eeti.com.tw/LinuxDriverDownload.html

It is from eGalax which is I'm guessing pretty popular.

I did sign in as the admin using su admin.

So what do you guys suggest?

0 Kudos
Message 5 of 54
(4,582 Views)

Downloading the installer, I see the issue:

CheckPermission() {

    echo -n "(I) Check user permission:"

    account=`whoami`

   if [ ${account} = "root" ]; then

        echo " ${account}, you are the supervisor."

    else

        echo " ${account}, you are NOT the supervisor."

        echo "(E) The root permission is required to run this installer."

        echo ""

        exit 1

    fi

}

Basically, it's checking specifically for the root username. You can either change this to something like

if [ "${account}" = "root" -o "${account}" = "admin" ]; then

or (preferably)

if [ `id -u` -ne 0 ]; then

Make sure to put spaces between the square brackets and the code within. Basically, the root and admin users both have user ID 0, so we're checking for either the root or admin users. Either by either account name or by the UID of the running user.

0 Kudos
Message 6 of 54
(4,582 Views)

I tried both ways, and I kept getting the same error. Here is my last edit.

if [ `id -u` -ne 0 ]; then

0 Kudos
Message 7 of 54
(4,582 Views)

The first option should work. The second, I made a silly mistake and it should be

if [ `id -u` -eq 0 ]; then

0 Kudos
Message 8 of 54
(4,582 Views)

If this is a one-off installation can I suggest a more pragmatic approach? Remove the test in CheckPermission() entirely - you already know you're running as root/admin, the test in the script is just getting in the way.

0 Kudos
Message 9 of 54
(4,582 Views)

Always trying to ruin the fun by being practical

0 Kudos
Message 10 of 54
(4,582 Views)