Results 1 to 10 of 10
-
04-27-2011, 04:46 PM #1Web Hosting Guru
- Join Date
- Jan 2006
- Location
- Toronto, Canada
- Posts
- 317
how to create a regluar user with root privilege
I have server A and B. I want to use rsync to make a backup from A to B.
i follow this
http://www.howtoforge.com/mirroring_with_rsync
I create someuser on server A. And I want someuser to be able to access all the file on server A, so that I can copy all the files I need to server B.
How to create someuser with root privilege?
-
04-27-2011, 04:49 PM #2Temporarily Suspended
- Join Date
- Nov 2010
- Location
- Arizona
- Posts
- 298
You can have your rsync commands run using su -c
-
04-27-2011, 05:01 PM #3Russ
- Join Date
- Mar 2002
- Location
- Philadelphia, PA
- Posts
- 2,517
^ Yes, ideally you would want to sync as a user, unless root is absolutely required.
You can create two user's on the box, best bet would be to sync (NIS/Manually) their UID/GID as well to keep it fluid across both servers.
-
04-27-2011, 05:02 PM #4Web Hosting Guru
- Join Date
- Apr 2011
- Location
- Clouds
- Posts
- 347
create sudo user and work rsync
straight forward██ » hostcats.com - Linux|Windows
██ » Shared|Reseller|Tomcat|vps|dedicated servers|Cloud
██ » Datacenters:USA|India Cloud: OnApp
██ » 100 days Full Refund| No Questions are asked!
-
04-28-2011, 12:35 AM #5Web Hosting Guru
- Join Date
- Jun 2010
- Posts
- 271
why do not you use root user? or you can add a user to your server and change its gid or uid to 0 in /etc/passwd file. it will work like root but with different password
-
04-28-2011, 09:22 AM #6Web Hosting Guru
- Join Date
- Jan 2006
- Location
- Toronto, Canada
- Posts
- 317
-
04-28-2011, 09:40 AM #7Web Hosting Master
- Join Date
- Apr 2009
- Location
- inside wht
- Posts
- 746
well setup an ssh key authentication between these servers and run this commands as a root cron .
24x7 PROACTIVE SERVER MANAGEMENT | OUTSOURCED WEB HOSTING SUPPORT
Sales : sales @ syslint.com | Call us : (+91)9447607799 | Are you looking for DevOps Admins ?
-
04-28-2011, 11:06 AM #8Web Hosting Guru
- Join Date
- Jan 2006
- Location
- Toronto, Canada
- Posts
- 317
I use visudo
and add this line
erd321 ALL=(ALL) ALL
But it still say
Permission deniedLast edited by heropage; 04-28-2011 at 11:10 AM.
-
04-28-2011, 11:23 AM #9Web Hosting Guru
- Join Date
- Jan 2006
- Location
- Toronto, Canada
- Posts
- 317
now when I logon to server A as user erd321.
When I run
sudo ls
but how do I run this command on server B with sudo command
/usr/bin/rsync -avz -e "ssh -i /root/rsync/mirror-rsync-key" erd321@87.8.9.12:/var/lib/mysql/ /var/backup/int_server/mysql/
-
04-28-2011, 11:44 AM #10Web Hosting Guru
- Join Date
- Jan 2006
- Location
- Toronto, Canada
- Posts
- 317
I use
/usr/bin/rsync --rsync-path="sudo rsync" -avz -e "ssh -i /root/rsync/mirror-rsync-key" erd321@87.8.9.12:/var/lib/mysql/ /var/backup/int_server/mysql/
stdin: is not a tty
sudo: sorry, you must have a tty to run sudo
rsync: connection unexpectedly closed (0 bytes received so far) [receiver]
rsync error: error in rsync protocol data stream (code 12) at io.c(463) [receiver=2.6.8]
Similar Threads
-
PHP user privilege help
By LP560 in forum Programming DiscussionReplies: 1Last Post: 05-26-2010, 09:08 PM -
Create view privilege?
By Chaz123 in forum Programming DiscussionReplies: 1Last Post: 02-09-2009, 01:38 PM -
How can i add another root ( user with full root access) ?
By learnerman in forum Hosting Security and TechnologyReplies: 7Last Post: 06-06-2005, 06:42 PM -
find and remove user privilege
By faysal in forum Hosting Security and TechnologyReplies: 5Last Post: 06-10-2004, 03:19 AM -
how do i create a root user with ftp access to entire server?
By kimrari in forum Hosting Security and TechnologyReplies: 10Last Post: 05-21-2003, 06:37 PM