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!
TBNK


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!
TBNK