Hot answers tagged

3

I would suggest to use ACL (access control lists) in this case. It allows much more finegrained control than just user/group permissions. See https://linuxconfig.org/how-to-manage-acls-on-linux for an introduction.


2

Either create the user alice with a uid of 1001 or change the ownership of the files from 1001 to 1002. Create a user with a specific uid: useradd alice -u 1001 find all files owned by 1001 and chmod them to alice (this will also change the gid to alice's primary group): find /data -uid 1001 -print0 | xargs -0I{} chown alice: {}


2

If you have root access, impersonate the user, then run test -r (read), test -w (write), or test -x (execute) to check whether the user can read/write/execute the given file. sudo -u otheruser test -w /file/to/test


2

There are other users besides root that are daemons (process managers) that you shouldn't change. I suggest the following command issued as root: for user in $(grep "/home" /etc/passwd | cut -s -d':' -f1) do passwd -e $user done Always test sections of code, especially before applying a command modifying users ability to login. You may have to undo ...


1

Couple of options. If you don't have a user on the new system with uid=1001, then change alice's uid to that via usermod -u 1001 -g 1001 alice. Other option is to change the ownership of the files on /data using sudo find /data -uid 1001 -print0 | xargs -0 chown alice:alice.


1

It looks like the name batcastle is the username, while live is the so-called fingername. Both are stored in the file /etc/passwd. The username (that is the login name) is somewhat more complicated to change, because most likely you want to have the home directory called /home/$(whoami). To change the username, use usermod. usermod -l newusername -d /home/...


Only top voted, non community-wiki answers of a minimum length are eligible