LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-19-2011, 11:14 AM   #1
Alphatechwv
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Rep: Reputation: 0
User access to directory on a server (SUSE 9.1)


I am new to Linux and need to add user access to a particular directory on a Linux server (SUSE 9.1).
Example: userBFA
Directory: server01/SMF
I am able to access the directory via telnet however I do not know the commands to add the user. userBFA needs read\write access to the SMF directory.

Please let me know if any additional information is needed.

Thank you!!!
 
Old 04-19-2011, 11:34 AM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
You can use "useradd" command to add user's to your system. If you type "man useradd" you can get details of how to use the command.

You can give user access to a directory in several ways: As owner of the directory, as a member of the group that has access to the directory or using acls. You need to decide how you want to do it before you create the user as the group(s) you make the user a member of are important unless you make the user the owner of the directory. (Making the user the owner of the directory is OK if that is the only user that is going to access it but if others are using it then you don't want to do that.)

From what you wrote I gather the directory already exists. If so run "ls -ld server01/SMF" to see the permissions, ownership and group. (Note the path you list isn't "fully qualified" - in Linux paths start with / e.g. /server01/SMF or /home/server01/SMF or /opt/server01/SMF - since you listed a relative path I'm not sure what the full path is.)
You should see something like:
drwxr-xr-x 5 billybob users 4096 Apr 19 10:09 server01/SMF

The first field tells you it is a directory and has permissions (mode) 755. (Type "man chmod" to see information setting permissions/mode.) The 3rd field shows the owner (billybob) and the fourth shows the group (users). Type "man chown" and "man chgrp" for information changing owner and group.

ACLs are a bit more advanced and if not currently in use you probably don't want to mess with them.
 
Old 04-19-2011, 12:43 PM   #3
Alphatechwv
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by MensaWater View Post
You can use "useradd" command to add user's to your system. If you type "man useradd" you can get details of how to use the command.

You can give user access to a directory in several ways: As owner of the directory, as a member of the group that has access to the directory or using acls. You need to decide how you want to do it before you create the user as the group(s) you make the user a member of are important unless you make the user the owner of the directory. (Making the user the owner of the directory is OK if that is the only user that is going to access it but if others are using it then you don't want to do that.)

From what you wrote I gather the directory already exists. If so run "ls -ld server01/SMF" to see the permissions, ownership and group. (Note the path you list isn't "fully qualified" - in Linux paths start with / e.g. /server01/SMF or /home/server01/SMF or /opt/server01/SMF - since you listed a relative path I'm not sure what the full path is.)
You should see something like:
drwxr-xr-x 5 billybob users 4096 Apr 19 10:09 server01/SMF

The first field tells you it is a directory and has permissions (mode) 755. (Type "man chmod" to see information setting permissions/mode.) The 3rd field shows the owner (billybob) and the fourth shows the group (users). Type "man chown" and "man chgrp" for information changing owner and group.

ACLs are a bit more advanced and if not currently in use you probably don't want to mess with them.

The user is already added and is a member of the domain. What I am getting stumped on is how to specify adding a particular user to have permissions. From what I have read, I understand how to give permissions but I haven't found anything to show me how to give permissions to a specific user. If I wanted to give billybob (as an example name you used) permission to this directory, I wouldn't know how to go about it. I am used to working with Windows servers so this is a learning curve for me.

I have been looking code up and I can only find code to specify for "all users" and not a specific user.

I appreciate your help and I hope you understand what I am trying to accomplish here.
 
Old 04-19-2011, 02:33 PM   #4
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
"member of the domain". It sounds like you're talking about Samba setup (sharing files out to Windows from UNIX or Linux)?
 
Old 04-20-2011, 08:52 AM   #5
Alphatechwv
LQ Newbie
 
Registered: Apr 2011
Posts: 3

Original Poster
Rep: Reputation: 0
I figured it out. Thanks for your help!
 
Old 04-20-2011, 09:46 AM   #6
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,831
Blog Entries: 15

Rep: Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669Reputation: 1669
Please post your solution. That way if anyone else has same issue in future they can find what you did to resolve it.
 
  


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
changing home directory permission in user management after user created in suse(KDE) hamedhsn Linux - Security 4 04-06-2011 09:18 PM
[SAMBA] Allow access to a directory only to a single user lucazorzi Linux - Server 1 06-30-2010 04:00 PM
Allowing user access to one directory only aje Slackware 5 05-25-2005 08:12 PM
can not access directory from user account - only root walterbyrd Linux - General 1 03-04-2005 11:23 PM
How to assign directory access to a user linuxfans Linux - General 7 04-16-2003 12:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 07:48 PM.

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