LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
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
  Search this Thread
Old 06-28-2006, 11:17 PM   #1
kkeith
LQ Newbie
 
Registered: Oct 2005
Posts: 22

Rep: Reputation: 15
create a user who can also run useradd and passwd only


Hi all,

Since my client requests us to create a user (e.g. admin) for which "admin" can create another users with password and can help those users to map network drives (in linux server)that can be seen in their winxp PCs. Plesae help me for listing out some steps, urgent and thanks !

Keith
 
Old 06-28-2006, 11:25 PM   #2
kkeith
LQ Newbie
 
Registered: Oct 2005
Posts: 22

Original Poster
Rep: Reputation: 15
or just change one of their user's /etc/passwd from something like that "lchau:x:507:507:Ling Chau:/home/lchau:/bin/bash" to "lchau:x:0:0::/home/lchau:/bin/bash" as I know it's the same as root, but it just temporary only and I will change the settings of lchau back to normal afterwards. Is it possible ?
 
Old 06-29-2006, 12:54 AM   #3
mcmillan
Member
 
Registered: Jul 2005
Distribution: Arch
Posts: 489

Rep: Reputation: 30
I think it should be possible to set this up using sudo. This will let users execute certain commands with root privileges. You'll need to install sudo if it isn't part of your distro by default. Then edit the configuration file with the command visudo (you can directly edit /etc/sudoers, but with visudo it's a bit safer because it checks syntax and some other safeguards I can't think of right now). There's decent documentation if you bring up man sudo, and my default sudoer file has examples of how to edit it as comments, but let us know if you're confused by these.

For what you want it's probably best to give these privileges to a special group, and add the users to that group.
 
Old 06-29-2006, 01:32 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
Yes, sudo is 100% the way to do something like this. You can grant any ability to any user that way, with or without passwords and other such things. You would allow the user you want to execute adduser or useradd, whichever you like.

If there are mapped drives from a linux server visable in windows, then you may need to make it the samba commands for adding sambausers. Don't use samba, so I can't tell you what the command would be.

Mapping the drive in windows is just a permissions issue. If the new user at least has read permissions on the directory you want them to map in windows, they can map it.

Peace,
JimBass
 
Old 06-29-2006, 07:28 AM   #5
kkeith
LQ Newbie
 
Registered: Oct 2005
Posts: 22

Original Poster
Rep: Reputation: 15
thanks mcmillan and JimBass ! But I need to test tomorrow. If I face any question, may I ask you all again ? Since I am also just dealing with the linux admin by searching info in Internet and some reference books.

Thanks
 
Old 06-29-2006, 07:43 AM   #6
ethics
Senior Member
 
Registered: Apr 2005
Location: London
Distribution: Arch - Latest
Posts: 1,522

Rep: Reputation: 45
Quote:
Originally Posted by kkeith
thanks mcmillan and JimBass ! But I need to test tomorrow. If I face any question, may I ask you all again ? Since I am also just dealing with the linux admin by searching info in Internet and some reference books.

Thanks
What sort of test? i wouldnt leave it till the last minute so you have to interupt some sort of demo or something so you can log on to LQ to get an answer

If it's just a self test type thing then i'm sure there will be people around
 
  


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
useradd: cannot create directory /home/ amirzkria Red Hat 5 08-07-2014 10:11 AM
Samba --> nobody run "add user script = /usr/sbin/useradd ....." ??!! Unconfigured Fedora 1 02-23-2006 05:54 AM
Samba --> nobody run "add user script = /usr/sbin/useradd %u ....." ???? Unconfigured Linux - Software 1 02-21-2006 10:01 AM
How do I create an user to run processes (ONLY)? eantoranz Linux - Security 4 01-04-2005 08:03 PM


All times are GMT -5. The time now is 04:21 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration