These tips can make life easier on your computer or home network, but they are extremely insecure. DO NOT use them unless:
sudo without
having to give the passwordsudo
group in the file /etc/group. Edit the file if
necessary. Here's an example:
.
.
floppy:x:25:
tape:x:26:
sudo:x:27:dierdorf
audio:x:29:pulse
dip:x:30:
www-data:x:33:
.
.
/etc/sudoers to give permission. You
must use the program visudo (as root) to edit this
file! (If sudoers is messed up, the system might not run at all; the
visudo program checks for syntax errors before writing back to the
disk.) To be safe, do the following:
> cd /etc > sudo cp sudoers sudoers.bak > sudo visudo [make changes as shown below] [save the file]
i) and how to exit (esc, :x! to quit without
saving, esc, :wq to save your changes.)
# User privilege specification
root ALL=(ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
%sudo ALL=NOPASSWD: ALL
nfs-kernel-server is
installed on the computers at both ends of the connection. (You will
probably have to restart for it to take effect.)
/etc/exports:
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
#
# Example for NFSv2 and NFSv3:
# /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check)
#
# Example for NFSv4:
# /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check)
# /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check)
#
/home/dierdorf gateway(rw) lphoto(ro)
...listing the directory to be shared, each computer you wish to allow access, and whether you want read-write or read-only privilege. For example, I'm allowing machine "gateway" to have RW access to my home directory on the laptop, but "lphoto" can only read it.
mkdir otherdir to
create a mount point.
sudo mount [url] otherdir where [url] is of
the form "machine://path". For example,
othercomputer://home/dierdorf or
192.168.0.2://home/dierdorf/sharedfiles
otherdir on the local computer.
/etc/fstab file:
[url as above] [mountpoint] nfs users,auto 0 0
System Settings -->Advanced -->Login Manager
-->Convenience.
On your head be it.