yesterday i made a clean install of ubuntu19.04. Over /etc/fstab I mount my debianhome and make a bind mount to an folder.
In both systems the 1.user is the same name.
but I was suprised which permissions are ubuntu shown in the folder.
ls -al jd2/
total 12784
drwxr-xr-x 18 alex sambashare 4096 Mär 20 2019 .
drwxr-xr-x 22 alex alex 4096 Okt 28 08:23 ..
drwxr-xr-x 3 alex sambashare 4096 Okt 10 2016 .install4j
-rw-r--r-- 1 alex sambashare 7950765 Mär 20 2019 Core.jar
---snip
I boot debian, but the gid is 1000 from my user, all okay there.
grep samba /etc/group
sambashare:x:1000:alex
and
id
uid=1000(alex) gid=1001(alex) groups=1001(alex),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),117(lpadmin),1000(sambashare)
How can I fix it, without destroying the whole system?
sudo groupdel sambashare
and
sudo groupmod -g 1000 alex
Have I afterwards to change the rights in my $HOME? is think so.
stat .bashrc
File: .bashrc
Size: 3771 Blocks: 8 IO Block: 4096 regular file
Device: 802h/2050d Inode: 1703939 Links: 1
Access: (0644/-rw-r--r--) Uid: ( 1000/ alex) Gid: ( 1001/ alex)
Access: 2019-10-27 11:13:25.003912078 +0100
Modify: 2019-04-04 05:11:47.000000000 +0200
Change: 2019-10-27 10:59:25.817456367 +0100
Birth: -
My question was already the answer.
id
uid=1000(alex) gid=1000(alex) Gruppen=1000(alex),4(adm),24(cdrom),27(sudo),30(dip),46(plugdev),117(lpadmin)
alex@Guilmon:~$
Obviously you can't rename "alex" to "alex" so you need to rename "1001" to "1000" instead. This answer appears to work for you:
Read the entire Q&A but in summary (if you agree it works for you) use:
You might also want to change the group name for GID 1001 to "alex2". This will make it easier to spot files you may have missed.