Skip to content

Instantly share code, notes, and snippets.

@sargun
Created August 27, 2021 03:49
Show Gist options
  • Save sargun/e6dad6bd1ecf8aac6552e6fce6471560 to your computer and use it in GitHub Desktop.
Save sargun/e6dad6bd1ecf8aac6552e6fce6471560 to your computer and use it in GitHub Desktop.
sargun@ubuntu:~$ id
uid=1000(sargun) gid=1000(sargun) groups=1000(sargun),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),110(lxd),115(lpadmin),116(sambashare),139(wireshark),999(docker)
sargun@ubuntu:~$ strace -e trace=sethostname hostname foo
sethostname("foo", 3)                   = -1 EPERM (Operation not permitted)
hostname: you must be root to change the host name
+++ exited with 1 +++
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment