Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: David Maciejak
RE: openSUSE 11.1 / install problem [ reply ]  
2009-07-08 09:39
oui plutot bizar, je viens de tester sur une opensuse 10.3, apres un sudo bash, un env | grep USER me retourne bien 'root'. Il doit y avoir un probleme dans votre config, sinon vous pouvez toujours commenter le exit dans le code pour pouvoir tester GNMS.

Merci,
david

By: Jean-Christophe BAPTISTE
RE: openSUSE 11.1 / install problem [ reply ]  
2009-07-08 09:21
Bingo, c'est bien le problème :

# env |grep USER
USERNAME=jc
USER=jc

Assez curieux, j'essaye de savoir si c'est spécifique à la distribution ou si c'est un effet de bord d'une de mes configs.

By: David Maciejak
RE: openSUSE 11.1 / install problem [ reply ]  
2009-07-08 09:11
merci pour le feedback, dans module/gnms.rb le test suivant est effectué

if ENV["USER"] != "root"
$log.error("You need to be logged as root to used gnms")
exit(1)
end

comme vous pouvez le voir, on test la variable d environnement ENV. Que vous renvoie la commande 'env |grep USER'

merci,
david

By: Jean-Christophe BAPTISTE
openSUSE 11.1 / install problem [ reply ]  
2009-07-08 08:57
Weired message problem :

# whoami
root
# id
uid=0(root) gid=0(root) groupes=0(root)
# ./gnms
E, [2009-07-08T10:54:15.499732 #24424] ERROR -- GNMS: You need to be logged as root to used gnms
[1] 24421 exit 1 ./gnms

How is the root privilege tested (I don't know ruby unfortunately) ?
Thanks for your help.