diff options
-rwxr-xr-x | debian/vyatta-cfg-system.postinst.in | 23 | ||||
-rwxr-xr-x | lib/Vyatta/Login/User.pm | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/debian/vyatta-cfg-system.postinst.in b/debian/vyatta-cfg-system.postinst.in index 9850f077..2c32a91f 100755 --- a/debian/vyatta-cfg-system.postinst.in +++ b/debian/vyatta-cfg-system.postinst.in @@ -219,6 +219,29 @@ update-rc.d vyos-intfwatchd start 2345 # set ec2-vyos-init to start on boot update-rc.d ec2-vyos-init start 2345 +# Add radius operator user for radius users to map to +if ! grep -q '^radius_user' /etc/passwd; then + adduser --quiet --firstuid 1000 --disabled-login --ingroup users --gecos "radius user" --shell /bin/vbash radius_user + adduser --quiet radius_user quaggavty + adduser --quiet radius_user vyattaop + adduser --quiet radius_user operator + adduser --quiet radius_user adm + adduser --quiet radius_user dip + adduser --quiet radius_user users +fi + +# Add radius admin user for radius users to map to +if ! grep -q '^radius_priv_user' /etc/passwd; then + adduser --quiet --firstuid 1000 --disabled-login --ingroup vyattacfg --gecos "radius privileged user" --shell /bin/vbash radius_priv_user + adduser --quiet radius_user quaggavty + adduser --quiet radius_user vyattacfg + adduser --quiet radius_user sudo + adduser --quiet radius_user adm + adduser --quiet radius_user dip + adduser --quiet radius_user disk + adduser --quiet radius_user users +fi + # Local Variables: # mode: shell-script # sh-indentation: 4 diff --git a/lib/Vyatta/Login/User.pm b/lib/Vyatta/Login/User.pm index e03888cd..e0305fbb 100755 --- a/lib/Vyatta/Login/User.pm +++ b/lib/Vyatta/Login/User.pm @@ -231,6 +231,9 @@ sub update { # This can happen if user added but configuration not saved # and system is rebooted foreach my $user ( _local_users() ) { + # skip radius users + next if $user eq 'radius_user'; + next if $user eq 'radius_priv_user'; # did we see this user in configuration? next if defined $users{$user}; |