Article 52XYZ Sudo Hostname

Sudo Hostname

by
TBotNik
from LinuxQuestions.org on (#52XYZ)
All,

Having an issue with a BASH script where it needs the hostname running the sudo cmd!

The /etc/hosts file has these settings:

Code: i
127.0.0.1 localhost
127.0.1.1 Aspire-LT

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouterswhich usually mean running the cmd "hostname" will return the value from 127.9.1.1, but running that cmd it only says "(none)".

The cmd running in the script is:

Code:konsole --tabs-from-file ktabs.txt -exv "su -u root -p $mypss"which is to open the konsole in sudo mode.

Because of the hostname error sudo is not working correctly!

So where do I set the hostname that sudo is looking for?

Any ideas? Thanks!

Cheers!

TBNKlatest?d=yIl2AUoC8zA latest?i=ClrcuFnObQA:0O-jl9bwEhs:F7zBnMy latest?i=ClrcuFnObQA:0O-jl9bwEhs:V_sGLiP latest?d=qj6IDK7rITs latest?i=ClrcuFnObQA:0O-jl9bwEhs:gIN9vFwClrcuFnObQA
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments