webmin / usermin

Usermin source code
http://www.usermin.com/
Other
117 stars 48 forks source link

usermin cannot change user real name #91

Closed gstlouisgit closed 1 year ago

gstlouisgit commented 1 year ago
Operating system CentOS Linux 7.6.1810
Usermin Version 1.860
Authentic theme version 20.00
Time on system 02/11/2023 8:55:48 AM
Disk quotas 100 KiB of 1 GiB

There seems to be a problem when trying to change the user info for users that use usermin for their email. When the account was created, the user info firstname had a typo. When the user went to the usermin tab->Login->change user details to change the real name, the following error occurred. Attached are the before and after snippets

Screen Shot 2023-02-11 at 8 51 20 AM Screen Shot 2023-02-11 at 8 51 28 AM

iliajie commented 1 year ago

Hello,

It doesn't seem that chfn command supports usernames with @ in command line mode. Although, you could use chfn command run without parameters to enter an interactive mode to change user real name.

iliajie commented 1 year ago

Also, I think we could use usermod -c for this purpose nowadays.

iliajie commented 1 year ago

Alright, next Usermin release will handle usernames with @ correctly.

gstlouisgit commented 1 year ago

Hi @iliajie so just to be clear, the only thing I was updating in those inputs was to correct the typo in coordinatrice, where it says "Real name". So I'm going to assume you're talking in the back end it is fetching or doing this modification by the username that holds the @?

A workaround for now was for me to update this "Real name" directly from virtualmin by editing the user.

iliajie commented 1 year ago

So I'm going to assume you're talking in the back end it is fetching or doing this modification by the username that holds the @?

Yes, correct.

A workaround for now was for me to update this "Real name" directly from virtualmin by editing the user.

Yes, that would work too. Although, we need to display only Real Name in that field in Virtualmin.

jcameron commented 1 year ago

In your /etc/webmin/useradmin/config file, do you have the line extra_real=1 ?

gstlouisgit commented 1 year ago

Good morning

@jcameron it is set to 0. I have pasted a live copy for you

passwd_same=0 random_password=0 passwd_stars=0 passwd_progmode=0 passwd_file=/etc/passwd uid_calc=0 gid_calc=0 extra_real=0 secmode=0 gid_mode=1 shadow_file=/etc/shadow display_mode=1 new_user_gid=0 uid_mode=1 group_file=/etc/group passwd_dict=0 base_uid=1000 base_gid=1000 lock_string=* new_user_group=1 md5=1 membox=0 selinux_con=user_u:object_r:user_home_dir_t user_files=/etc/skel delete_only=0 homedir_perms=0750 home_base=/home last_show=0 default_other=1 sort_mode=0 empty_mode=0 post_command= shells=fixed,passwd,shells email_type=0 delete_root=0 skip_md5=0 from_files=0 alias_check=0

jcameron commented 1 year ago

Seems like in that case we shouldn't allow editing of the office and phone numbers in Usermin..

iliajie commented 1 year ago

Seems like in that case we shouldn't allow editing of the office and phone numbers in Usermin

Then this should be applied to the code I have recently added? However, I never added it because neither chfn/save or chfn/index.cgi (of the old code) checks for extra_real.

Also, how Usermin will have access to extra_real stored in Webmin config directory?