Allow existing server usernames [Linux]

These are old archives. They are kept for historic purposes only.
Post Reply
mindsystem
Posts: 2
Joined: Thu Oct 13, 2011 5:07 pm

Allow existing server usernames [Linux]

Post by mindsystem »

I read through the FAQ and modules list, as well as the config sections of the documentation. Didn't see anything of the sort there. So excuse me if this information exists out there and I wasn't a good enough searcher.

Background info:
I'm looking to set up a local irc at my university, solely for the computer science students. We have a Linux (Fedora) server we can ssh into to submit assignments to, and my professor said there wouldn't be an issue setting up an irc (though he doesn't have any experience [well, neither do I..]).

Main question:
Is there a way to only allow nicks to log in that have a user on the server already? Would the config file be able to parse a command like:

Code: Select all

$(cat /etc/passwd | grep "/home" | cut -d: -f1)
Thereby pulling only the registered users on the system?

Or would I have dump those to a file like so:

Code: Select all

cat /etc/passwd |grep "/home" |cut -d: -f1 > users.list
and then have the config load that? (is this possible?)

Or, finally, would a module have to be written to do something like this?

I could, of course manually enter the usernames/nicks, but I would like something that (if possible/available) could be updated automatically if a new user is created. Thanks a lot.

(PS - Mods, if this is in the wrong place, sorry. Feel free to move)
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Allow existing server usernames [Linux]

Post by katsklaw »

If I understand you correctly, you would like your local Linux users to be able to login to irc. If that is correct then simply add a listen block for IP 127.0.0.1. Then install a CLI based client. I recommend weechat or irssi. Users can then SSH in to your server and connect to 127.0.0.1
mindsystem
Posts: 2
Joined: Thu Oct 13, 2011 5:07 pm

Re: Allow existing server usernames [Linux]

Post by mindsystem »

I hadn't thought of that. It's a good idea, though certainly not preferred. Just for curiosity's sake, though, how hard do you suppose writing a custom module like that would be? On a scale of 1-10, ten being Godzilla, one being a kitten.
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Allow existing server usernames [Linux]

Post by katsklaw »

Module for what? An ircd is just like any other background daemon, you must connect with a client. You can't connect to the ircd directly from a terminal, you have to have a client. This is no different than ssh, you must have a ssh client to connect to the ssh server.
Jobe
Official supporter
Posts: 1180
Joined: Wed May 03, 2006 7:09 pm
Location: United Kingdom

Re: Allow existing server usernames [Linux]

Post by Jobe »

@katsklaw I think he means a module to restrict nicks to the user names to which the user uses for SSH.
Your IP: Image
Your Country: Image
katsklaw
Posts: 1124
Joined: Sun Apr 18, 2004 5:06 pm
Contact:

Re: Allow existing server usernames [Linux]

Post by katsklaw »

Jobe1986 wrote:@katsklaw I think he means a module to restrict nicks to the user names to which the user uses for SSH.
Ahh, in that case it's possible with a module and shouldn't be too hard. At least for the connection process. A modified SUMMON command may work. Unfortunately Unreal doesn't have summon, it's permanently disabled. After the user is connected though they would still have the /nick command, that would have to act like the USER command.
Syzop
UnrealIRCd head coder
Posts: 2112
Joined: Sat Mar 06, 2004 8:57 pm
Location: .nl
Contact:

Re: Allow existing server usernames [Linux]

Post by Syzop »

If you go with katsklaw suggestion of running the ircd on localhost only, so only local users can connect, then you could as well install an identd server (if not running already).
If you enable ident checking in the ircd (set::options::identd-check) then - in this particular setup - the ident field can be trusted as it will be the account name of the user.
Sure, they can still choose their own nick, but their ident will reveal who they are :)
Post Reply