Ascend Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (ASCEND) Newbie Radius Question.



Here's a quick something i banged together when i initially set up my
users file.  You can add whatever additional print lines you like.  Just
create your basic file with the regular default entries, then run it
like this:

./users.gather >> /etc/raddb/users

Nothing fancy, but it does work.

users.gather:

#!/bin/sh -
#
        
PATH=/sbin:/usr/sbin:/bin:/usr/bin
cp /etc/passwd ./passwd.tmp

awk 'BEGIN      {
                        FS = ":"
                }
                {
                        # Filter out slip and PPP accounts
                        if ($1 ~ /^P/) {
                                if ($1 != "root" && $1 != "toor" && \
                                    $1 != "demo" && $1 != "www") {   
                                        printf ""$1" Password =
\"UNIX\"\n"
                                        printf "\tUser-Service =
Framed-User,\n"
                                        printf "\tFramed-Protocol =
PPP\n"
                                }
                        }
                }' passwd.tmp
                        
echo removing temporary files
rm -f passwd.tmp
exit 0


Craig Salmond wrote:
> 
> Is it possible to have radius read the /etc/passwd (or /etc/shadow) file
> instead of the /etc/raddb/users  file? Or alternatley a way to create the
> users file from the /etc/passwd file.
> 
> TIA
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Craig Salmond                                        salmond@mail.cde.com
> Craig's DATA Exchange!                                 http://www.cde.com
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> Shipping Address           (FLA) 735-CDE1 Sales           Billing Address
> Craig's DATA Exchange!     (FLA) 483-2482 Home     Craig's DATA Exchange!
> 18826 U.S. HWY 441         (FLA) 735-9511 FAX               P.O. Box 1401
> Mt. Dora, FL 32757         (FLA) 735-INET BBS          Mt. Dora, FL 32757
>                    "Lake County's Internet Authority"
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 
> ++ Ascend Users Mailing List ++
> To unsubscribe: send unsubscribe to ascend-users-request@bungi.com
> To get FAQ'd:   <http://www.shore.net/~dreaming/ascend-faq>
> or              <ftp://ftp.shore.net/members/dreaming/ascend-faq.txt>

-- 
Don Joy
System Administrator
SooNet Corp
++ Ascend Users Mailing List ++
To unsubscribe:	send unsubscribe to ascend-users-request@bungi.com
To get FAQ'd:	<http://www.shore.net/~dreaming/ascend-faq>
or		<ftp://ftp.shore.net/members/dreaming/ascend-faq.txt>


References: