Page 1 of 1

Allow existing server usernames [Linux]

Posted: Thu Oct 13, 2011 6:04 pm
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)

Re: Allow existing server usernames [Linux]

Posted: Thu Oct 13, 2011 11:08 pm
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

Re: Allow existing server usernames [Linux]

Posted: Fri Oct 14, 2011 2:54 am
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.

Re: Allow existing server usernames [Linux]

Posted: Fri Oct 14, 2011 3:10 am
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.

Re: Allow existing server usernames [Linux]

Posted: Fri Oct 14, 2011 12:09 pm
by Jobe
@katsklaw I think he means a module to restrict nicks to the user names to which the user uses for SSH.

Re: Allow existing server usernames [Linux]

Posted: Fri Oct 14, 2011 3:20 pm
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.

Re: Allow existing server usernames [Linux]

Posted: Fri Oct 14, 2011 6:10 pm
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 :)