Today's article is about finding your hostname.

KGIII

Super Moderator
Staff member
Gold Supporter
Joined
Jul 23, 2020
Messages
11,499
Reaction score
9,998
Credits
95,342
There was a very, very short article like this on the old site. This is much more complete.

 


i've seen a thread how did you get your handle name ;for trivia lovers might be question how did you give your PC a hostname . Mine's darkstar .

I almost had to google what was a fire hydrant with your addition to site of click on pics to show your not a robot. Is your robots.txt :
User-agent: Googlebot
Allow: /sitemap.xml

etc not working ?
 
It shouldn't ask you to solve anything. Hmm... It's supposed to be invisible ReCAPTCHA. I'll have to take a look at it. I also shouldn't have had to manually approve your comment, so something is amiss. You've made a previous comment - which is the low-bar for entry and ability to post comments without manual approval.

And, I think that'd make an interesting thread. In my case, it's just my username and a descriptor - often the brand of the device or the OS installed. So, it'd be things like kgiii-lmde or kgiii-msi (both of which actually exist). My main system, the one I use most frequently, is just plain ol' 'kgiii'.
 
one thing i found when i walked away from WordPress to Coddeigniter and roll up my sleves and code Object Orientied PHP that for instance i could just right my own simple captcha code. Its on a log in page for my daughters web; so i'm not publishing that and its not easy to find. If you insist on Wordpress they are still holding a simple plugin for pirates day i summitted- pirates day is sometime in September. The plugin converts text to pirate talk --rr me harties

The spaghetti code needed and their submission process i went though to confirm WP is not for me- but they must be mad they are still making my plugin available: https://wordpress.org/plugins/ye-old-pirate/
 
WordPress has plugins well over a decade old. It's insane that they don't disable the old stuff and leave it in their 'repos'. I'd agree with them having a policy of something like 2 years. If it hasn't at least been touched in 2 years by the devs, remove it. Those old plugins are potentially riddled with security holes. I doubt everyone actually pays attention to how old the plugins are.

And, I'm not switching away from WP. Nope. I'm pretty happy with it - most of the time. Also, Google kinda likes the site. For its age, it ranks pretty well for some stuff. I'm pleasantly surprised that it's even ranking at all, as it has only been up for a month. The other site was up for like six months and Google still hated it. Though Bing preferred the older site over the current one. I have no idea why, as they're the same thing in many ways.
 
i'm sure you could write your own cpatcha plugin for Wp , if you look at my ye olde... next to nothing in it ;

the core idea of mine for CI4 is this:
Code:
$myarray = array( chr(rand(48,57)) , chr(rand(48,57)) , chr(rand(48,57)) , chr(rand(48,57)) , chr(rand(48,57)));

then there is session to count login attempts and captcha refreshes. For each digit shown i find it , and what was entered and to show image I match an image for digit shown.
 
Oh, absolutely. There are even dozens of plugins to crib from, if needed.

Usually the invisible CATPCHA doesn't ask you for anything. I went through and changed a couple of settings to help make sure of it. Hopefully that works. In this case, it's all part of a suite.
 
You forgot about hostnamectl ;)
Code:
hostnamectl status                               
Static hostname: lilith
       Icon name: computer-desktop
         Chassis: desktop
      Machine ID: 2b289aa4f92549d2a29d4f3c040ed5d6
         Boot ID: 7e4598e3884a4219bbe4c4b91f7f6aa9
Operating System: Arch Linux                       
          Kernel: Linux 5.12.7-zen1-1-zen
    Architecture: x86-64
Hardware Vendor: Micro-Star International Co., Ltd.
  Hardware Model: MS-7B17
Code:
hostnamectl [OPTIONS...] COMMAND ...

Query or change system hostname.

Commands:
  status                 Show current hostname settings
  set-hostname NAME      Set system hostname
  set-icon-name NAME     Set icon name for host
  set-chassis NAME       Set chassis type for host
  set-deployment NAME    Set deployment environment for host
  set-location NAME      Set location for host

Options:
  -h --help              Show this help
     --version           Show package version
     --no-ask-password   Do not prompt for password
  -H --host=[USER@]HOST  Operate on remote host
  -M --machine=CONTAINER Operate on local container
     --transient         Only set transient hostname
     --static            Only set static hostname
     --pretty            Only set pretty hostname

See the hostnamectl(1) man page for details.
I replied to the original article but it shortened my username to fdmbits instead of f33dm3bits. Can you take off the limit of the length of the username?
 
I can check the username limits and see and I didn't really forget it - I just didn't have the gumption to include it. I figured I'd given enough methods already. As memory serves, I included three ways. I'm pretty sure I had hostnamectl in a draft at one point? I'm not positive.

Still, t'was an excellent addition and I'm glad you added it.

I'll look into username lengths as soon as I have a minute for that sort of thing. I don't *knowingly* impose any length limits, so I'll have to dig deeper.
 
And you can also add editing /etc/hostname to that article.
 
I figured it out.

It's associating your username with your email. When you first wrote a comment, you wrote the short username. You then had me go back through the system and edit the username. I was quite surprised that I was able to do so, as I'd never done it before.

Anyhow, the two are connected in the system, so it uses your initial username, and not the edited username.

I can keep changing it every time you comment. You could live with it. I could manually dig through the database, find the connection, and try to correct the username associated in the database.

I'm a wee bit too inebriated to try the latter this evening.
 
I figured it out.

It's associating your username with your email. When you first wrote a comment, you wrote the short username. You then had me go back through the system and edit the username. I was quite surprised that I was able to do so, as I'd never done it before.

Anyhow, the two are connected in the system, so it uses your initial username, and not the edited username.

I can keep changing it every time you comment. You could live with it. I could manually dig through the database, find the connection, and try to correct the username associated in the database.

I'm a wee bit too inebriated to try the latter this evening.
Just leave it then, if it starts to bother me I'll create an e-mail alias for posting there and then enter my username how I want it.
 
Just leave it then, if it starts to bother me I'll create an e-mail alias for posting there and then enter my username how I want it.

It also may associate it with your IP address, but that's unlikely.

Last night, I went through and removed any instance to fdmbits and changed them all to f33dm3bits. phpMyAdmin was kind enough to point all instances out, though I did opt to change them manually 'cause I was a wee bit inebriated.

So, it may work the next time you try commenting. I do not know.
 
So, it may work the next time you try commenting. I do not know.
I'll see what happens next time I make a comment ;)
 
If it doesn't work, then I'll be darned if I can figure out where it's storing that data. As near as I can tell, usernames can be pretty lengthy. Others have longer names than your username. I edited every single instance I found in the database. So, if it doesn't work then something else is going on and I have no idea what. I even double-checked to ensure there are no more instances that I missed last night.

And, regarding your previous comment, ain't it grand to just host your own email? It's a pain, but it's worth it.
 

Members online


Latest posts

Top