Jump to content

Recommended Posts

Posted

Right, following on from my previous thread, I've found that changing some permissions and hiding the Movies/Pictures/Downloads/etc folders after mounting the home drive direct to the ~/Documents folder makes everything work.

 

The kids are now forced to save into their ~/Documents folder which is mounted directly to their home share on a windows server.

 

I mount the drive to ~/Documents using the following command:

 

mount_smbfs smb://server/hiddenshare$/$USER ~/Documents

 

this works fine while I'm testing it in terminal, but adding that to a login script gives the following error:

 

mount_smbfs: mount error: /Users/USER$/Documents: No such file or directory
logout

 

Any ideas where I'm going wrong. I'm sure it'll be massively obvious!

Posted

Is the script getting confused by the $ symbol? It might be that in the script context, the variable that has the username isn't set properly.

 

You might also need to look at wether the $ signs are there because the share is hidden, or if its a variable that should be substituted.

Posted (edited)
The error means exactly what it says, ~/Documents doesn't exist for a users first login until it's created long after a successful login by the gnome shell (or whatever). To fix this add a Documents directory with the correct permissions to /etc/skel (I assume you're running a full PAM login?). Any botched home directories will need to be fixed manually (or just nuke the home directories if there's nothing there). Edited by Geoff

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...