7

I set up a FreeNAS box a while ago and against better judgement, used an uppercase character when creating my username. This has led to a directory called George.

Now, when I later read that uppercase characters were highly discouraged, especially in the use of Samba (which I'm using), I decided I'd like to try and repair this.

What steps should I take to rename a user account from mixed uppercase to all lowercase, bearing in mind that data already exists for this user?

Michael Hampton
  • 244,070
  • 43
  • 506
  • 972
deed02392
  • 278
  • 1
  • 5
  • 16

1 Answers1

8
  • Edit the username, groupname and home path in the passwd file with vipw
  • Edit the groupname in the group file with vipw -g
  • Rename your homefolder with mv
  • Reboot the server
Christopher Perrin
  • 4,811
  • 19
  • 33
  • 1
    ...and next time trust your better judgment :-) (Really, most users can't remember which are the upper-case letters in their passwords. Letting users have upper-case letters in their usernames just doubles the chance for mistakes.) – voretaq7 Aug 07 '13 at 19:04
  • `vipw` did the job for the user, but I had to change the case in `/etc/group` too. – deed02392 Aug 07 '13 at 19:06
  • @deed02392: You are right. I forgot about that. I edited the answer. – Christopher Perrin Aug 07 '13 at 19:08
  • And what a beautiful edit it was. Cheers. – deed02392 Aug 07 '13 at 19:22
  • You also want to rename the user in /etc/aliases – Wayne Nov 25 '18 at 16:06
  • So I tried this with FreeNAS v11 and it doesn't work at all. Users that are renamed with vipw are reverted after the next reboot. – Wayne Jan 01 '19 at 15:39
  • FreeNAS is a bit strange with it's configs. If recall correctly, most of the config files are recreated on boot from some database. I don't know for sure and I don't know how it works exactly. FreeNAS is so heavily modified, that I wouldn't call it a FreeBSD. – Christopher Perrin Jan 02 '19 at 15:55