If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > Unix Shell Scripts > MV user Home to /tmp but...

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 11-15-03, 11:08
dball5557 dball5557 is offline
Registered User
 
Join Date: Nov 2003
Location: Pa
Posts: 1
MV user Home to /tmp but...

Hi,

I'm not sure how to write this script and was hoping someone would help me out, it is for Mac OS 10.3 and the macs are binding to Active Directory for Authentication. The shell by default is bash now when running 10.3.

When you log into a Mac it automatically creates a Home Directory for the user from the OS X user Home Directory Template and names the home directory the same as the users username. So if Joe User has a user name of userj and he logs in he gets a home directory of userj.

Here is what I would like to do:

When a user logs out I want a shell script to kick off moving the users home directory to /tmp. But if that user logs in again and out I need the script to add a digit or something on the end so it doesn't error out or overwrite the home directory from before.

One problem I am having is in /Users I don't want the Admin home folder deleted or a directory called shared deleted or moved.

Locations:

User Home Directory: /Users/ the users AD username
Temporary Storage: /tmp

Can someone help me out? I have looked all over and tried writing it myself but I am not sure how to add a digit or something to the end so it doesn't error out or overwrite the home directory already in /tmp. Plus I'm not sure how to identify all the users and not delete the admin or shared directories in /Users.

Thanks,

Dan
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On