LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices

Reply
 
LinkBack Search this Thread
Old 04-23-2008, 07:46 AM   #1
shiftdelete
LQ Newbie
 
Registered: Apr 2008
Posts: 3

Rep: Reputation: 0
Question Linux File Server Permissions issue- ULTRA Newb needs help!


First off- I know next to nothing about linux, except linux web servers with Cpanel / WHM, and how to connect with Putty via SSH.

I recently joined a company that has a linux file server. This server is running Gentoo, and uses Samba to establish permissions from our Windows-based Active Directory.

Some users are having trouble accessing some of the shared folders. I believe the previous guy (very much a linux guy, but extremely backwards in the ways of setting things up), established all permissions based on individual Users instead of Groups.

Here is where I need help- I need to figure out the commands to browse directories, as well as "get into" samba, and reset permissions. So, if someone could list some of these commands as a reference, or link to a site that has these in detail, that would be awesome.

I know a user that has the Correct permissions, so I'd like to find a way to VIEW those, and then a way to apply those on other users.

Again, I can login via SSH as root (scary, huh?), but I have no knowledge of what to do from there. I can ask around and the share name of the folders, but I still don't know how to "browse" directory tree listings to find them on the drive. There is no GUI on the system, this is SSH commands only.

So, any help would be VERY much appreciated.

Thanks,

Shiftdelete

Last edited by shiftdelete; 04-23-2008 at 07:49 AM.
 
Old 04-23-2008, 07:54 AM   #2
Fergatron
LQ Newbie
 
Registered: Apr 2005
Location: Georgia, USA
Distribution: Fedora 12
Posts: 25

Rep: Reputation: 15
I'm not a network guru by no means, but how about Samba's HOWTO page: http://wiki.samba.org/index.php/Main_Page#HowTos. I also found this:

Last edited by Fergatron; 04-23-2008 at 08:06 AM.
 
Old 04-23-2008, 08:10 AM   #3
shiftdelete
LQ Newbie
 
Registered: Apr 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks, I read through most of it, but it really doesn't say much about those basic commands.

I also had an idea-- If this Server has no GUI, is it possible to install one to make this easier?

Any further help would be appreciated.
 
Old 04-23-2008, 11:23 AM   #4
shiftdelete
LQ Newbie
 
Registered: Apr 2008
Posts: 3

Original Poster
Rep: Reputation: 0
Any other suggestions? or can someone provide a list of basic Samba / LINUX commands?

Or inform me if installing a GUI on gentoo linux is a better idea?

Thanks in advance.
 
Old 04-23-2008, 11:40 AM   #5
IsaacKuo
Senior Member
 
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 4.0 Etch
Posts: 1,346

Rep: Reputation: 49
The only Samba command you'll probably need is the one to start/stop/restart it. I'm not familiar with how those are done in Gentoo. Practically everything else you will ever do with Samba is to modify /etc/samba/smb.conf. You can edit it using:

vi /etc/samba/smb.conf

...assuming you know how to use vi (if you have to ask, you don't). I don't know what other text editors are on your Gentoo system; probably at least "pico", which is easier to use, at least.

So typically, you will edit smb.conf and then restart the samba daemon so your changes "take effect". Make sure to copy the file before making changes in case you mess things up.

If you're familiar with DOS commands, some of the basics are:

cd == cd (use "/" slashes instead of "\" slashes)
dir -> ls -l (the -l option gives you a long listing including file permissions)
copy -> cp
erase -> rm

As you can tell, the original developers of Unix were very lazy typists.

If you need to change the actual permissions on the files, then you're going to have to get friendly with the commands "chmod" and "chown". Do some www searches for tutorials on how to use them. Unix file permissions are flexible and complex.
 
Old 04-23-2008, 11:59 AM   #6
jei
LQ Newbie
 
Registered: Jul 2006
Posts: 29

Rep: Reputation: 16
Installing a gui won't offer much assistance when dealing with smb, However it would allow you to manage shares through a graphical point and click means.

Some basic commands for managing users and groups.

adduser (adds a new user to the system)
deluser (deletes user)
passwd username (changes or adds a password for user)
groupadd groupname (adds a new group)
groupdel groupname (deletes group)
useradd username groupname (adds a user to a group)

--- Taken from oreilly.com ----

7.1.4.4 Removing a member from a group

Unfortunately, no command removes a user from a specified group. The easiest way to remove a member from a group is by editing the /etc/group file. Here's an excerpt from a typical /etc/group file:

users:x:100:
nogroup:x:65534:
bmccarty:x:1000:
newbies:x:1002:newbie01,newbie02,newbie03

Each line in the file describes a single group and has the same form as other lines, consisting of a series of fields separated by colons (. The fields are:

Group name

The name of the group.
Password

The encrypted password associated with the group. This field is not generally used, containing an x instead.
Group ID

The unique numeric ID associated with the group.
Member list

A list of user accounts, with a comma (,) separating each user account from the next.

To remove a member from a group, first create a backup copy of the /etc/group file:

cp /etc/group /etc/group.SAVE

The backup can prove helpful if you modify the file incorrectly. Next, open the /etc/group file in a text editor. Locate the line that describes the group and delete the user name and the following comma, if any. Save the file, exit the editor, and check your work.

---Taken from oreilly.com END -------

you may also be able to use smbstatus to show what shares are available and who is accessing them. However, this is not always installed.

Here is a link to the oreilly.com book the section above is pasted from
http://www.oreilly.com/catalog/debia...k/ch07_01.html

Jei
 
Old 04-23-2008, 06:28 PM   #7
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5
Posts: 16,086

Rep: Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995Reputation: 1995
If you are that new to Linux, here are some worthwhile tutorials etc:
http://rute.2038bug.com/index.html.gz
http://tldp.org/LDP/Bash-Beginners-G...tml/index.html
http://www.tldp.org/LDP/abs/html/
http://linux.oneandoneis2.org/LNW.htm

given its a free OS, maybe you should consider dual booting at home to get extra practice etc.
 
Old 04-23-2008, 07:12 PM   #8
marquardl
Member
 
Registered: Apr 2008
Posts: 100

Rep: Reputation: 15
learn the basics

If you have to manage the server remotely and want to do it with a graphical interface, then you should install a vncserver and a client on your local PC. This way you can login to X Windows on the server, if it is installed at all.

If the server is at your location, than rather seat yourself in front of it. Other than that, SSH allows the same commands you would use on a terminal. Your problem is not SSH, but missing experience with the UNIX shell (most likely Bash). As such you should study the basics before tampering with a production environment.

Editing /etc/samba/smb.conf and using "useradd username groupname (adds a user to a group)" statements could solve your problem. Or simply made those shared directories world-writeable by using 'chmod a+w directory-name' on the command-line/SSH. Not a secure solution.


Server issues

Last edited by marquardl; 05-01-2008 at 04:11 AM.
 
  


Reply

Tags
networking, samba windows


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the best way to be a file server in Linux? *I'm a newb* (all help welcomed) RZKESP Linux - Networking 1 07-01-2006 05:36 PM


All times are GMT -5. The time now is 06:10 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