LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 06-16-2011, 09:11 AM   #1
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Mount issue. How do i mount as a different user?


Im mounting a directory, that I need to be accessible from a normal user's desktop.

mount -t cifs -o credentials=/root/.creds //192.168.100.226/mountpoint/ /mnt/mountpoint/

But it is giving /mnt/mountpoint permissions as 770, root:1003

How do I change that group to... 501?
 
Old 06-16-2011, 10:50 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Just my loose thoughts...but, how about putting the contents of .creds in a central spot (/opt perhaps?) and make a symlink per user to that spot, chmod the proper rights to it...

By the way, is'nt it somewhat "iffy" to grant a day-to-day user access to the Root's creds? Of course, I can be a wee paranoid at times...

But...I am a Linux newbe too (ar'nt we all?)

Thor
 
Old 06-16-2011, 11:14 AM   #3
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
and the answer is:

Code:
mount -t cifs -o uid=500,gid=500,credentials=/root/.creds //192.168.100.226/dir/ /mnt/dir/
 
1 members found this post helpful.
Old 06-16-2011, 11:15 AM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,278

Original Poster
Rep: Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694Reputation: 1694
Quote:
Originally Posted by Thor_2.0 View Post
Just my loose thoughts...but, how about putting the contents of .creds in a central spot (/opt perhaps?) and make a symlink per user to that spot, chmod the proper rights to it...

By the way, is'nt it somewhat "iffy" to grant a day-to-day user access to the Root's creds? Of course, I can be a wee paranoid at times...

But...I am a Linux newbe too (ar'nt we all?)

Thor
The username/password is in the .creds file, which I do not want accessible by other users. So, root owns it. I'm mounting the dir as root, but allowing a regular user to access it.

Thanks for the help.
 
1 members found this post helpful.
Old 06-16-2011, 11:36 AM   #5
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Thanks dude I learned something here! You lit up my day!

Thor
 
  


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
How to give not-root user ability to mount devices to any mount point??? jdupre Linux - General 8 02-04-2012 10:03 AM
How to mount a Windows shared directory and have mount point be owned by nonroot user Arodef Linux - Software 3 09-14-2009 12:23 AM
help please: mount -t smbfs -a fails as normal user, as root, doesn't mount anything thevic Linux - Networking 11 04-09-2007 03:09 AM
USB drive mount double mount issue pazzport Ubuntu 3 10-10-2005 08:28 PM
user cant mount after chmod 777 /bin/mount misterwiddle Linux - General 2 04-06-2005 05:36 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration