Hello everyone!
I am struggling to detect in a script whether the current user is root or
not. Etc.getlogin seems to return my unpriveleged username even after
I have done an 'su' or run the script with 'sudo' to become root.
All I really need is:
if Etc.getuid != 0
puts "You are not root"
exit
end
--
ruby -e "puts 'Just another fickle programmer'"
Leslie Viljoen [leslie / camary.co.za]
Camary Consulting [http://www.camary.co.za]
Cellphone [083-6186100]
Personal web [http://mobeus.homelinux.org]