LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 09-02-2005, 09:52 AM   #1
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Rep: Reputation: 30
Need to mount Windows shares as "user"


Trying to set up a Slackware workstation and need each user to be able to access their home directory on a Windows server. Only problem is that when I try to do that I get "only root can do that".

I know that yall will need some other information, but not sure what you will need so just ask and I'll comply if possible.

I can print to any shared printer, can ping all nodes on the network.

TIA,
MMYoung
 
Old 09-02-2005, 09:58 AM   #2
objorkum
Member
 
Registered: Aug 2003
Location: Norway
Distribution: Slackware 10.0
Posts: 231

Rep: Reputation: 30
Must the user be able to mount it?

Or do you just want the user to be able to access it after root has mountet it?
 
Old 09-02-2005, 10:28 AM   #3
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Original Poster
Rep: Reputation: 30
Quote:
Originally posted by objorkum
Must the user be able to mount it?

Or do you just want the user to be able to access it after root has mountet it?
There may be more than one user using the same PC so I was hoping that there was something that I could do in the .bash_profile (?) or something similar. This way ONLY the logged in user would "see" their home directory.

If only one user logged onto the PC I could just set it up in fstab to mount when the PC booted, but was hoping to do it per user. If that is possible.

Thanks,
MMYoung
 
Old 09-02-2005, 05:57 PM   #4
tank728
Member
 
Registered: Sep 2003
Posts: 142

Rep: Reputation: 16
I think i understand what your getting at, and what todo. Here is my suggestion. You could create a file /etc/profile.d/local.sh. Here the file will get executed every time some one logs on the system (it gets called by /etc/profile and the .sh is important). To my understanding when these files (/etc/profile.d/*.sh) are executed, the are executed by root. So you would do some type of user checking `whoami` and mount the appropriate directory based one the according user. Let me show you what I mean.

Code:
#!/bin/sh
#
# /etc/profile.d/local.sh
#
case `whoami` in
   mmyoung)
      <your mount command here>
      ;;
   anotheruser)
      <your mount command here>
      ;;
   *)
      echo "unknown user" >&2
      ;;
esac
I hope this helps, and good luck

-tank
 
Old 09-12-2005, 06:39 AM   #5
MMYoung
Member
 
Registered: Apr 2004
Location: Arkansas
Distribution: Ubuntu 8.10
Posts: 365

Original Poster
Rep: Reputation: 30
Sorry for not responding sooner but I've been racking my "search finger" trying to come up with a way to do what this feller wants done but 1.) I'm ether looking in the wrong place or 2.) it can't be done. Here is what I've done so far:

I got everything working the way that I thought the dude wanted it to work. The first thing the netadmin had to do was to actually SHARE the user folder on the server. As I stated, right now the folders aren't shared but are mapped to the user when they log on, by an Active Directory thingy.

In fstab I put the following:
/server/share /home/user/Desktop/USer smbfs noauto,credentials=/home/user/.smbcred,uid=user,gid=users 0 0

Created the /home/user/Desktop/USer folder.

Created a /etc/profile.d/local.sh script.

#!/bin/sh
#
# /etc/profile.d/local.sh
Case `whoami` in
user)
sudo mount /home/user/Desktop/USer
;;
anotheruser)
sudo mount /home/anotheruser/Desktop/ANotheruser
;;
*)
echo "unkown user" >&2
;;
esac

Edited the sudousers file to include
user ALL=NOPASSWD:/bin/mount /home/user/Desktop/USer, /bin/umount /home/user/Desktop/USer

My assumption is that I would have to edit the sudousers file to include EVERY user that logs on to that PC and to include them in the local.sh file above.

Now when the user logs on his/her folder on the network is mounted automagically, they have a folder on their desktop and have read/write access to that folder. I got Evolution to access my mail folder on their Exchange server so that the user could use Evolution just like they use Outlook. (I didn't have any meetings to go to so I wasn't able to check out that fuction of Evolution just yet).

I showed netadmin what I had done with the help of a few friends (thanks to everyone who has helped me with this!) and he was impressed. Then he asked about how this could be replicated througout the office. I said that each PC would have to be set up, individually. He said, "Well, that's great BUT... it's too much like the old Windows 95 stuff." What he wants is to be able to have the same thing happen on a Linux box that happens on the Windows clients when they log in, without having to go to "each PC and do this manually and without having to share their folders, can you do that?" I had to reply, honestly, that I didn't know.

Is there a way to set samba/linux client to use a logon script from an AD server the same way that a Windows client does when logging onto the network?

I know you can do it the other way around, have a Windows client run a logon script on a samba/linux server but haven't found a way to go from linux to Active Directory.

Any suggestions?

TIA,
MMYoung
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to mount windows harddrive in Linux: "already mounted" Xandor Linux - Software 10 11-28-2005 03:00 PM
Windows "Switch User" type funtionality iverger Red Hat 3 11-08-2004 02:41 AM
"User" & "System" CPU load difference JJX Linux - General 3 06-06-2004 01:42 AM
Is it possible to "permanently" mount samba shares? soren625 Linux - Software 1 05-13-2004 12:55 PM
Accessing windows drive from my "normal" user. At0mic_PC Slackware 6 08-01-2003 11:33 PM


All times are GMT -5. The time now is 07:01 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration