Mounting a standard user, windows share at login


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Mounting a standard user, windows share at login
# 8  
Old 12-01-2011
thanks as always

---------- Post updated at 06:05 PM ---------- Previous update was at 04:43 PM ----------

I guess I should have clarified a little bit from the start but my intentions are to mount the scripts at boot so it appears that really the best options is to add your mount to /etc/fstab. If you wanted to add the mount when you run a terminal, then you could call a script from the ~/.bashrc. Just wanted to add this comment to the forum in case other people are interested:

I could create a scripts that mounts the windows share:

Code:
#!/bin/bash
mount -t cifs //rscserv01/testuser/testuser\ backups -o credentials=/home/testuser/.smbcredentials /media/testmount
...
...
...
...

then call the script from ~/.bashrc or /etc/profile.d so that when I login via a terminal or ssh, it would automatically mount the windows share.
# 9  
Old 12-05-2011
Quote:
Originally Posted by metallica1973
I guess I should have clarified a little bit from the start but my intentions are to mount the scripts at boot so it appears that really the best options is to add your mount to /etc/fstab. If you wanted to add the mount when you run a terminal, then you could call a script from the ~/.bashrc. Just wanted to add this comment to the forum in case other people are interested:

I could create a scripts that mounts the windows share:

Code:
#!/bin/bash
mount -t cifs //rscserv01/testuser/testuser\ backups -o credentials=/home/testuser/.smbcredentials /media/testmount
...
...
...
...

then call the script from ~/.bashrc or /etc/profile.d so that when I login via a terminal or ssh, it would automatically mount the windows share.
Not unless you're logging in as root, no.

I repeat that fstab may not be the best option to make it automatic because, if your NFS mounts don't work on boot, your system will fail to boot, the sort of reason your admin didn't want you modifying /etc/fstab.

Making them 'user' mounts then having something else mount them later won't prevent the system from booting. Putting them in crontab like I suggested would work -- when cron starts, that line would run and would mount the filesystems...
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Mounting a samba share

Hi, I need to mount a directory from a Windows server to a CentOS box. The Windows server used is Windows Server 2003, and the path to the directory that I want to mount on CentOS is C:\Tomcat6\webapps\NASApp\logs. I am not sure of the correct way to mount this on CentOS, as most of the... (2 Replies)
Discussion started by: anaigini45
2 Replies

2. UNIX for Beginners Questions & Answers

Mounting Windows Share to Linux Server

Hi Folks - I need to mount a Windows Share to a Linux server. What is the best/easiest way to do this? Is this 'how-to' guide accurate: How to Share Files Between Windows and Linux Or is there a better method you could share? Thanks! (8 Replies)
Discussion started by: SIMMS7400
8 Replies

3. UNIX for Dummies Questions & Answers

[Solved] error while mounting windows share on linux

Hi whan i am trying to mount a windows share on linux i received the following error can some one help me with thsi # mount -t cifs \\\\servername\testdata -o username=xw27,password=*es*feed /test Mounting the DFS root for a particular server not implemented yet No ip address specified... (5 Replies)
Discussion started by: robo
5 Replies

4. HP-UX

user can't write on cifs share but OK with Windows Explorer

Share ServerA ==== The Samba server is running on Samba version 3.0.22 based HP CIFS Server A.02.03.04 /opt/cifsclient/sbin/cifsclientd version: HP CIFS Client - Version A.02.02.02 smb file: My previous casw was thew user wasn't able to write to the share from Windows... (1 Reply)
Discussion started by: lamoul
1 Replies

5. Shell Programming and Scripting

Script to copy User home folders to mounted windows share

First of all, let me state that I am a windows admin. I have a windows share mounted to /mnt/server I need a script that will either login as sudo or perform commands with sudo rights. I need the script to copy all of the users /home folders to the mounted windows share. Now If I can... (7 Replies)
Discussion started by: EricM
7 Replies

6. Solaris

mounting windows share folder

please help me,,i need step to mount windows share folder,,i try samba and nfs and it didnt work (in my linux server the command is fine),,can somenone give me an example for this to be done? (0 Replies)
Discussion started by: Cellscript
0 Replies

7. IP Networking

Problem Mounting NFS share

I have one machine "The server" ip: 192.168.1.1, it runs ubu 8.04(LTS) and - I have a folder (/shareme) that I want to share with other linux machines on my LAN. - The server runs NFS server and common and portmap and so do the other machines on my LAN. - The server has the export file with the... (2 Replies)
Discussion started by: fcron
2 Replies

8. UNIX for Advanced & Expert Users

Help mounting Windows share in UNIX

We recently upgraded one of our engineering servers, and now the lone UNIX box that houses older CAD files can not connect to it. I have tried every variation of mount I can find, but to no avail. Help is appreciated. Here are the specs: Server: Windows 2003 x64 with Unix Services for Windows... (8 Replies)
Discussion started by: shatterstorm
8 Replies

9. Solaris

Mounting CIFS share

Is it possible to mount a samba share on a solaris system? I know this is possible with Linux using a fstype of smbfs. I am trying to aviod having to share the same directories via cifs and nfs on a solaris box to windows and solaris clients. (3 Replies)
Discussion started by: mhm4
3 Replies

10. Windows & DOS: Issues & Discussions

Mounting a windows share on AIX

Hi, How can I mount a Windows share (over samba) on an AIX machine? I know there is a utility called smbmount on Linux, but alas, I cannot find out how to the same thing on AIX. anyone have any ideas? thanks! (3 Replies)
Discussion started by: szahir1
3 Replies
Login or Register to Ask a Question