It is currently Thu Mar 23, 2017 4:13 pm



Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 10:30 am 
Offline

Joined: Sun Aug 21, 2011 10:59 am
Posts: 992
As previously reported, the live media continues to disallow the use of upper and lower case letters in the account name.

In antiX-13 (and earlier releases) the installer permitted mixed case account names. The regression was introduced in antiX-15 and remains present in antiX-16 RC1.

After installation, via the Control Center it is possible to create a user account with mixed case letters. This indicates the issue is located in the live installer and is a wholly unnecessary restriction. It goes against the basic antiX concepts of flexibility and user choice.

By restricting a mixed case account name to being created post installation, it prevents the carry over of pre-installation customizing to the installed system. It defeats one of the most recent innovations of antiX, thereby making it necessary to separately configure each account manually, on each individual machine.

Additionally, the unnecessary restriction is unhelpful and confusing on existing sites where mixed case names are already employed, particularly those that provide networked resources. For example where share access and/or management is authorised using a mixed case name. It is also confusing for users in locations where antiX is used alongside other distros that do permit a mixed case name.

antiX should continue its previous standard method of allowing a mixed case account name to be specified in the live installer.


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 12:51 pm 
Offline
User avatar

Joined: Sun Dec 16, 2007 4:49 pm
Posts: 2105
samk, I'm not sure what is standard anymore.

adduser reports this when I try to add Dolphin (capital D)

Code:
root@littlebit:/home/dolphin# adduser Dolphin
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable.  Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.


This is also true in ubuntu. I believe this is forced by debian upstream. To get Dolphin, I had to user "useradd" which doesn't create home folders.

the user-management app actually forces a --bad-name switch to use the mixed case username.

Code:
function add-user {
    USER="$1";
    OPTIONS="$2";
    echo "$USER" > /tmp/user-setup.txt
    echo "$USER" >> /tmp/user-setup.txt
    echo "$USER" >> /tmp/user-setup.txt
    echo "0" >> /tmp/user-setup.txt
    echo "0" >> /tmp/user-setup.txt
    echo "0" >> /tmp/user-setup.txt
    echo "0" >> /tmp/user-setup.txt
    echo "y" >> /tmp/user-setup.txt
    adduser $USER --force-badname $OPTIONS < /tmp/user-setup.txt


so the question is, which one is wrong. the installer (with the same restrictions as adduser) or the control center app, with the --force-badname switch

_________________
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 15 32 bit (streaming media player)
sony laptop amd 900mhz duran 512mb ram, antix 13 32-bit
lenovo s21e - 2gb ram, celeron - antiX-16 64 bit


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 2:55 pm 
Offline

Joined: Sun Aug 21, 2011 10:59 am
Posts: 992
dolphin_oracle wrote:
adduser reports this when I try to add Dolphin (capital D)

Code:
root@littlebit:/home/dolphin# adduser Dolphin
adduser: Please enter a username matching the regular expression configured
via the NAME_REGEX configuration variable.  Use the `--force-badname'
option to relax this check or reconfigure NAME_REGEX.
[...]
so the question is, which one is wrong. the installer (with the same restrictions as adduser) or the control center app, with the --force-badname switch
Perhaps neither, or both.

Created 4 accounts to see the problem.
Quick, dirty and superficial test in a live no persistence environment.
As root
Code:
useradd TestUser1
useradd TestUser2
useradd testuser3
useradd TestUser4

Verified the accounts created
Code:
cat / etc/passwd | grep -E 'Test|test'
Testuser1:x:1001:1001::/home/Testuser1:/bin/sh
Testuser2:x:1002:1002::/home/Testuser2:/bin/sh
testuser3:x:1003:1003::/home/testuser3:/bin/sh
TestUser4:x:1004:1004::/home/TestUser4:/bin/sh


All 4 accounts were created with case variations and alphanumeric characters without any error messages.


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 3:40 pm 
Offline
User avatar

Joined: Sun Dec 16, 2007 4:49 pm
Posts: 2105
And no home folders created or default groups added.

The only thing that bugs me.is the reason for the adduser.conf. it comes from upstream and I wonder what problem it fixes. Or avoids.

Anyway the installer does the check in this case, not adduser.. Removing the check should allow.the creation of usernames as you request.

I still wonder about the reason for the check though. Doing some quick googling leads to a lot of recommendations to avoid mixed case but I have not found a clear reason as to why. Might possibly have to do with some sort of samba password syncing ( in samba dolphin is the same as DOlphin) but I'm really sketchy on this point.

_________________
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 15 32 bit (streaming media player)
sony laptop amd 900mhz duran 512mb ram, antix 13 32-bit
lenovo s21e - 2gb ram, celeron - antiX-16 64 bit


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 4:12 pm 
Offline

Joined: Thu Jan 21, 2010 12:36 am
Posts: 1035
Yes it does get confusing with Samba and other server services but IMHO it is really not that big of a problem (I set up several server systems) and can easily be remedied in other ways than name restrictions. Upper and lower case being different in all other areas of unix/linix but then restricted to match Microsoft's ideals is not something I agree with and when I use upper and lower case for filenames I would like to use them also for usernames. The fact to me that there is an override switch to allow mixed case to me suggests there is no real system crashing problem just a handful of minor potential issues.

_________________
Computers are like air conditioners. They work fine until you start opening Windows. ~Author Unknown


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 4:16 pm 
Offline

Joined: Sat Aug 25, 2012 2:41 am
Posts: 86
dolphin_oracle wrote:
And no home folders created or default groups added. ...

If I change the NAME_REGEX line in /etc/adduser.conf

from
Code:
#NAME_REGEX="^[a-z][-a-z0-9_]*\$"

to this
Code:
NAME_REGEX="^[a-zA-Z][-a-zA-Z0-9_]*\$?$"

the adduser command will let me create a new user with a mix of uppercase/lowercase and numerics in the username, it also creates the default groups and I think also the home folders.
Code:
$ sudo adduser Test1
Adding user `Test1' ...
Adding new group `Test1' (1001) ...
Adding new user `Test1' (1001) with group `Test1' ...
Creating home directory `/home/Test1' ...
Copying files from `/ etc/skel' ...
Enter new UNIX password:
Retype new UNIX password:
passwd: password updated successfully
Changing the user information for Test1
Enter the new value, or press ENTER for the default
   Full Name []:
   Room Number []:
   Work Phone []:
   Home Phone []:
   Other []:
Is the information correct? [Y/n]
Adding new user `Test1' to extra groups ...
Adding user `Test1' to group `dialout' ...
Adding user `Test1' to group `dip' ...
Adding user `Test1' to group `cdrom' ...
Adding user `Test1' to group `audio' ...
Adding user `Test1' to group `video' ...
Adding user `Test1' to group `plugdev' ...
Adding user `Test1' to group `users' ...
Adding user `Test1' to group `floppy' ...
Adding user `Test1' to group `netdev' ...
Adding user `Test1' to group `scanner' ...
Adding user `Test1' to group `lp' ...
Adding user `Test1' to group `lpadmin' ...
Adding user `Test1' to group `sudo' ...
Code:
$ ls -lah /home/Test1
total 36K
drwxr-xr-x 5 Test1 Test1 4.0K Jun 18 10:04 .
drwxr-xr-x 4 root  root  4.0K Jun 18 10:04 ..
-rw-r--r-- 1 Test1 Test1  220 Jun 18 10:04 .bash_logout
-rwxr-xr-x 1 Test1 Test1 3.8K Jun 18 10:04 .bashrc
drwxr-xr-x 9 Test1 Test1 4.0K Jun 18 10:04 .config
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 .gtk-2.0
drwxr-xr-x 3 Test1 Test1 4.0K Jun 18 10:04 .local
-rw-r--r-- 1 Test1 Test1  675 Jun 18 10:04 .profile
-rw-r--r-- 1 Test1 Test1   12 Jun 18 10:04 .xscreensaver
Code:
$ ls -lah /home/Test1/.config/
total 40K
drwxr-xr-x 9 Test1 Test1 4.0K Jun 18 10:04 .
drwxr-xr-x 5 Test1 Test1 4.0K Jun 18 10:04 ..
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 autostart
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 libfm
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 menus
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 Thunar
-rw-r--r-- 1 Test1 Test1   24 Jun 18 10:04 Trolltech.conf
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 vlc
drwxr-xr-x 2 Test1 Test1 4.0K Jun 18 10:04 volumeicon
drwxr-xr-x 6 Test1 Test1 4.0K Jun 18 10:04 xfce4


Would there be any unintentional consequences that might come up from changing the NAME_REGEX ?

edit: I did this as a test on my MX-15 install but I think I the results would be similar in antiX-16.


edit #2 It also works if I copy the stock /etc/adduser.conf file (without the NAME_REGEX changes) to a /usr/share/antiX/adduser.conf file and make the NAME_REGEX changes to it instead, and then run the adduser command with it's --conf option.
Code:
$ sudo adduser --conf /usr/share/antiX/adduser.conf Test1


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 7:23 pm 
Offline

Joined: Thu Feb 09, 2012 7:29 am
Posts: 1045
Quote:
In antiX-13 (and earlier releases) the installer permitted
First post describes the status quo as a "regression".
Idunno the minstall author's rationale for enforcing lowercase-only, but here's where it is being enforced, by design

https://github.com/antiX-Linux/antiX-in ... nstall.cpp minstall.cpp, line 1216
Code:
} else if (!userNameEdit->text().contains(QRegExp("^[a-z_][a-z0-9_-]*[$]?$"))) {
    QMessageBox::critical(0, QString::null,
                          tr("The user name needs be lower case and it\n"
                             "cannot contain special characters or spaces\n"
                             "please choose another name before proceeding."));
    return false;
}


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 8:52 pm 
Offline

Joined: Sun Aug 21, 2011 10:59 am
Posts: 992
skidoo wrote:
First post describes the status quo as a "regression".
Idunno the minstall author's rationale for enforcing lowercase-only, but here's where it is being enforced, by design
It is a regression in terms of what antiX was formerly able to do.

Dave wrote:
...I use upper and lower case for filenames I would like to use them also for usernames. The fact to me that there is an override switch to allow mixed case to me suggests there is no real system crashing problem just a handful of minor potential issues.
kmathern wrote:
If I change the NAME_REGEX line in /etc/adduser.conf...
I've just checked that file in antiX-13.2
Code:
Abstract start
# check user and group names also against this regular expression.
#NAME_REGEX="^[a-z][-a-z0-9_]*\$"
Abstract end
So it was purposely disabled, but I don't recall any reports of it causing problems.


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sat Jun 18, 2016 9:03 pm 
Offline
User avatar

Joined: Sun Dec 16, 2007 4:49 pm
Posts: 2105
As skidoo pointed out the installer does the account creation on its own. It does not use adduser but it does use the same username restrictions .

_________________
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 15 32 bit (streaming media player)
sony laptop amd 900mhz duran 512mb ram, antix 13 32-bit
lenovo s21e - 2gb ram, celeron - antiX-16 64 bit


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sun Jun 19, 2016 4:52 am 
Offline
User avatar

Joined: Sun Dec 16, 2007 4:49 pm
Posts: 2105
In the end its anti's call, but looking at the code, all that should need done is to comment out the section skidoo points out (or changing the expression to something else)

_________________
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 15 32 bit (streaming media player)
sony laptop amd 900mhz duran 512mb ram, antix 13 32-bit
lenovo s21e - 2gb ram, celeron - antiX-16 64 bit


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sun Jun 19, 2016 5:44 am 
Offline

Joined: Thu Feb 09, 2012 7:29 am
Posts: 1045
would be quick/simple to change regex, but really need to check into why the current lowercase restriction was chosen
contains(QRegExp("^[a-zA-Z_][a-zA-Z0-9_-]*[$]?$"))

I wouldn't have noticed, never thought to test mixed-case usernames.

consider:
ControlCentre -} Manage Users
the prefilled example username displayed when left-side AddUser button is clicked
is antiXDemo
which certainly hints that mixed-case is supported.
-=-
someone should test:
Does the installer successfully migrate such an account (username=antiXDemo) which has been created during live persistence?


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sun Jun 19, 2016 12:46 pm 
Offline

Joined: Sun Aug 21, 2011 10:59 am
Posts: 992
SamK wrote:
kmathern wrote:
If I change the NAME_REGEX line in /etc/adduser.conf...
I've just checked that file in antiX-13.2
Code:
Abstract start
# check user and group names also against this regular expression.
#NAME_REGEX="^[a-z][-a-z0-9_]*\$"
Abstract end
So it was purposely disabled, but I don't recall any reports of it causing problems.
dolphin_oracle wrote:
As skidoo pointed out the installer does the account creation on its own. It does not use adduser but it does use the same username restrictions
When taken together with antiX-13 and earlier employing an installer that allowed the use of mixed case account names, and the principal shipped tool for creating accounts after installation also allowing mixed case, it is an indication that there is no absolute need for the restriction. As mentioned previously, I do not recall reports of either causing problems.

dolphin_oracle wrote:
I still wonder about the reason for the check though.
skidoo wrote:
...but really need to check into why the current lowercase restriction was chosen
The file antiX-installer/NOTICE on github contains the following
Code:
abstract start
//   Copyright (C) 2003-2009 by Warren Woodford
//   Heavily edited, with permision, by anticapitalista for antiX-Linux and MX-14 2011-2014.
abstract end
It appears to have been developed in-house which is a good indication the configuration choices have also been made in-house.


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sun Jun 19, 2016 1:10 pm 
Offline
User avatar

Joined: Sun Dec 16, 2007 4:49 pm
Posts: 2105
I meant the reason debian used the restriction for adduser. Which was not done in house.

_________________
http://www.youtube.com/runwiththedolphin
eeepc 904ha antix 15 32 bit (streaming media player)
sony laptop amd 900mhz duran 512mb ram, antix 13 32-bit
lenovo s21e - 2gb ram, celeron - antiX-16 64 bit


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sun Jun 19, 2016 1:24 pm 
Offline
Site Admin
User avatar

Joined: Tue Sep 11, 2007 4:55 pm
Posts: 5755
Location: Greece
I have uploaded new antiX-installer that should allow for capitals. It will be put in /jessie/dev (so you need to edit the ant,x,list) until users provede feedback that it works ok not just during installation, but also as user for a while. Also it should be tested with other languages.

Also available here, for those that use dpkg -i

http://download.tuxfamily.org/antix/Testing/antiX-16/

_________________
Philosophers have interpreted the world in many ways; the point is to change it.


Top
 Profile  
 
 Post subject: Re: antiX-16 RC1 Account Name Regression
PostPosted: Sun Jun 19, 2016 6:09 pm 
Offline

Joined: Thu Feb 09, 2012 7:29 am
Posts: 1045
MX Adrian authored "minstall", yes? That's who/where you might inquire about the chosen restriction.
Or not {grin}

The adduser manpage mentions POSIX compliance
so, unless I hear/read otherwise, I figger debian's default just reflects the "neckbeard-compliant way"


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 16 posts ]  Go to page 1, 2  Next


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred