Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 04-23-2008, 07:46 AM   #1
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.



Last edited by shiftdelete; 04-23-2008 at 07:49 AM.
Old 04-23-2008, 07:54 AM   #2
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: I also found this:

Last edited by Fergatron; 04-23-2008 at 08:06 AM.
Old 04-23-2008, 08:10 AM   #3
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
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
Senior Member
Registered: Apr 2004
Location: Baton Rouge, Louisiana, USA
Distribution: Debian 9 Stretch
Posts: 2,182
Blog Entries: 8

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
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
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 ---- 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:


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.

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 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 book the section above is pasted from

Old 04-23-2008, 06:28 PM   #7
LQ Guru
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.9, Centos 7.3
Posts: 17,406

Rep: Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396Reputation: 2396
If you are that new to Linux, here are some worthwhile tutorials etc:

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
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.


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

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 > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:34 PM.

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