home directory links


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users home directory links
# 1  
Old 12-09-2008
home directory links

I need to put a soft link in each users home directory that is somethink like this

workspace --> /vol/workspace

Any suggestions what is the easiest way to accomplish this?
# 2  
Old 12-09-2008
make a list of users, use it in a script with a loop (while or for...) that does:
read user, cd user home directory, ln -s...

Simple no?
# 3  
Old 12-09-2008
Yes, i kinda figured that, but script writing is my weakness, guess i am goinna have to take the time to learn.
# 4  
Old 12-09-2008
ok I will give you a little help:
This is a loop to extract the users (and more so it need some cleaning...) from /etc/passwd:
Code:
cp /etc/passwd tmp$$
while read line
do
USER=$(echo $line|awk '{FS=":";print $1}')
echo $USER
done < tmp$$

So what you have to do now is sent the ouput to a file
and :
Code:
cat file| while read USER
do
...

done

Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. Solaris

SunOS confusing root directory and user home directory

Hello, I've just started using a Solaris machine with SunOS 5.10. After the machine is turned on, I open a Console window and at the prompt, if I execute a pwd command, it tells me I'm at my home directory (someone configured "myuser" as default user after init). ... (2 Replies)
Discussion started by: egyassun
2 Replies

2. UNIX for Dummies Questions & Answers

Why do I have two links in my rc.3 directory?

Hi, I am doing a services audit on one of our servers at work and I notice that I sometimes have a service with two slightly different prefixes. For example, S94httpd K15httpd Can one of them be safely deleted? (2 Replies)
Discussion started by: mojoman
2 Replies

3. Solaris

Restricting SFTP user to a defined directory and home directory

Hi, I've created solaris user which has both FTP and SFTP Access. Using the "ftpaccess" configuration file options "guest-root" and "restricted-uid", i can restrict the user to a specific directory. But I'm unable to restrict the user when the user is logged in using SFTP. The aim is to... (1 Reply)
Discussion started by: sftpuser
1 Replies
Login or Register to Ask a Question