Artificial intelligent assistant

adding home directory after -M option First off I'm new to Linux. I have created a new user called " **ginny** " with `-M` option. Now I'm trying to assign a home directory with `usermod -d /link/to/directory ginny` but it doesn't assign a home directory to user ginny. % su - ginny returns an error su: warning : cannot chance directory to /abc: No such file or directory -bash-3.2$: The `pwd` command returns `/root` for user ginny (maybe because i haven't created her a home directory) but is there any switch that can now allow me to assign a home directory to user ginny?

The user's home directory doesn't exist. `usermod` changes the home directory field in `/etc/passwd` but doesn't create the directory. You need to create it manually.


cp -a /etc/skel /link/to/directory # or mkdir /link/to/directory to create an empty home directory
chown ginny:ginnygroup /link/to/directory # where ginnygroup is ginny's primary group
chmod 755 /link/to/directory # or 711 or 700 or 751 or 750 as desired

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c8dc37f8c035f0f89965f6da84309d08