From 49016db2c49b4ba1c7e0481c6810ba365c2b270e Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Fri, 6 Jun 2008 22:44:52 -0700 Subject: Put vyatta users in the users group Change to use -n option to useradd: A group having the same name as the user being added to the system will be created by default (when -g is not specified). This option will turn off this behavior. When this option is used, users by default will be placed in whatever group is specified in the GROUP variable of /etc/default/useradd. If no default group is defined, group 100 (users) will be used. --- scripts/system/vyatta_update_login.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/system/vyatta_update_login.pl b/scripts/system/vyatta_update_login.pl index 27b8396c..61fe68ca 100755 --- a/scripts/system/vyatta_update_login.pl +++ b/scripts/system/vyatta_update_login.pl @@ -73,7 +73,10 @@ for my $user (@user_keys) { my $cmd; # not found in existing passwd, must be new if ( !defined $uid ) { - $cmd = 'useradd -s /bin/vbash -m'; + # make new user using vyatta shell + # and make home directory (-m) + # and with default group of 100 (users) + $cmd = 'useradd -s /bin/vbash -m -n'; } # TODO Add checks for attempts to put system users # in configuration file -- cgit v1.2.3