LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices

Reply
 
Search this Thread
Old 01-31-2004, 05:06 AM   #1
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Rep: Reputation: 32
2nd root (for adding client machines to Samba PDC) ?


Hi,

is there any way how to give a limited root access to another administrator? This administrator only takes care of windows client machines and he needs root access for adding a machine to the domain (Samba acting as PDC) when the client PC is reinstalled (quite often )

Thanks for your time
 
Old 02-01-2004, 04:14 AM   #2
enigmasoldier
Member
 
Registered: Jul 2003
Location: Florence, Ky
Distribution: CentOS 3.3-4, OpenBSD 3.3, Fedora Core 4, Ubuntu, Novell Open Enterprise Server
Posts: 213

Rep: Reputation: 30
The answer to your problem is a simple program named sudo.

Be sure NOT to give access to interactive editors such as vi that allow shell commands. If you do, what is going to stop him from nulling out the root password or changing his own uid to 0? Use the least privilege approach.

Links:
http://www.onlamp.com/pub/a/bsd/2002...y_Daemons.html
 
Old 02-01-2004, 07:59 AM   #3
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Original Poster
Rep: Reputation: 32
Thanks for the answer, but I have no clue how to use sudo with Samba.
Can u give an example how to set it up?

When u want to add a windows machine to the domain, the first login to the domain must be done as root (from the client).
 
Old 02-01-2004, 09:12 AM   #4
enigmasoldier
Member
 
Registered: Jul 2003
Location: Florence, Ky
Distribution: CentOS 3.3-4, OpenBSD 3.3, Fedora Core 4, Ubuntu, Novell Open Enterprise Server
Posts: 213

Rep: Reputation: 30
I'm not on a linux machine right now (I am deployed to Iraq and sitting in a free cyber cafe!) So I can't play around with Samba. I normally use nfs but here is basicly what you need to do.

1.) Document all commands that your PDC Admin routinely or will at some time use.

2.) Create a group named sambadm and add all of the users you want to be samba admins to this group.

3.) Create a '/etc/sudoers' file and add all of your permissions to it.

touch /etc/sudoers

The format for the /etc/sudoers file is very simple
username host = command

Here is an example:

%sambaadm PDC = /usr/bin/smbpasswd,/usr/sbin/useradd,\
/sbin/newfs,/sbin/newfs_msdos,/sbin/mount
Now the user just types 'sudo smbpasswd' or whatever they need to type. It will prompt them for their own password and then will execute. If you use the NOPASSWD option like the one listed in the last link, they won't even need a password. I hope this helps

Links:
http://www.courtesan.com/sudo/sudo.html sudo homepage
http://www.linuxhomenetworking.com/linux-hn/samba.htm
http://www.linuxhomenetworking.com/linux-hn/sudo.htm
http://lists.debian.org/debian-user/.../msg03647.html
http://www.onlamp.com/lpt/a/2680
http://www.courtesan.com/sudo/sample.sudoers check this out for some ideas

Last edited by enigmasoldier; 02-01-2004 at 09:53 AM.
 
Old 02-01-2004, 09:26 AM   #5
muah
Member
 
Registered: Aug 2003
Location: Europe
Distribution: Slackware (current)
Posts: 228

Original Poster
Rep: Reputation: 32
OK, thanks I ll give it a try when I get back to the office.
 
  


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
Samba 3.0 as PDC - adding computer accounts help bburnham1141 Linux - Networking 7 05-07-2009 07:22 PM
Adding Linux Clients to Samba PDC, 2 things RaVilj Linux - Networking 1 09-27-2005 04:42 PM
Samba PDC , LDAP user authentication , what about Machines ? Jingle Linux - Enterprise 0 07-22-2005 09:00 AM
automatic adding machines to domain in samba brasuca Linux - Networking 1 05-14-2004 07:09 AM
Samba PDC client Problem ah_shades Linux - Networking 5 01-17-2003 07:49 PM


All times are GMT -5. The time now is 11:02 PM.

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