Results 1 to 10 of 10
  1. #1
    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?

  2. #2
    Join Date
    Nov 2010
    Location
    Arizona
    Posts
    298
    You can have your rsync commands run using su -c

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

  4. #4
    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!

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

  6. #6
    Join Date
    Jan 2006
    Location
    Toronto, Canada
    Posts
    317
    Quote Originally Posted by asciiDigital View Post
    You can have your rsync commands run using su -c
    how to use su -c

    This is the command I am using now on Server B
    /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/

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

  8. #8
    Join Date
    Jan 2006
    Location
    Toronto, Canada
    Posts
    317
    I use visudo
    and add this line
    erd321 ALL=(ALL) ALL
    to make erd321 as sudoer
    But it still say
    Permission denied
    Last edited by heropage; 04-28-2011 at 11:10 AM.

  9. #9
    Join Date
    Jan 2006
    Location
    Toronto, Canada
    Posts
    317
    now when I logon to server A as user erd321.
    When I run
    sudo ls
    I can access all the files.
    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/

  10. #10
    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/
    But I get
    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

  1. PHP user privilege help
    By LP560 in forum Programming Discussion
    Replies: 1
    Last Post: 05-26-2010, 09:08 PM
  2. Create view privilege?
    By Chaz123 in forum Programming Discussion
    Replies: 1
    Last Post: 02-09-2009, 01:38 PM
  3. How can i add another root ( user with full root access) ?
    By learnerman in forum Hosting Security and Technology
    Replies: 7
    Last Post: 06-06-2005, 06:42 PM
  4. find and remove user privilege
    By faysal in forum Hosting Security and Technology
    Replies: 5
    Last Post: 06-10-2004, 03:19 AM
  5. how do i create a root user with ftp access to entire server?
    By kimrari in forum Hosting Security and Technology
    Replies: 10
    Last Post: 05-21-2003, 06:37 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •