-1

I have 10 systems with opensuse installed in each of them.I have created 2 servers such that one is NIS and other is NFS , i have added lets say 5 users to NIS and their corresponding home directories were rsynced to second system (NFS). NOw i want to write a script that can delete the user and also delete corresponding NFS located home folder.

I tried userdel but it was unable to delete directory from NFS

Mt /etc/exports of NFS server is

homescis *(fsid=0,crossmnt,rw,root_squash,sync,no_subtree_check)
2
  • The issue here is probably not usermod, but the permissions with which the file system is exported - specifically, how the server treats requests that originate from root-owned client processes). If this is so, no script is going to be able to do what you want. Could you cut-and-paste into the question the relevant line in /etc/exports on the NFS server?
    – MadHatter
    Jul 7, 2014 at 6:31
  • homescis *(fsid=0,crossmnt,rw,root_squash,sync,no_subtree_check)
    – user229534
    Jul 7, 2014 at 6:45

1 Answer 1

0

On the server, change root_squash to no_root_squash and do an exportfs -av. That is causing requests issued by root on the client to be interpreted without privilege on the server; if you want tools like usermod to run, root privilege is needed on the /home filesystem.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .