Re: [BackupPC-users] Not able to use the backuppc account in freebsd
From: Michael Stowemst...@chicago.us.mensa.org The FreeBSD equivalent would be su -m backuppc -c /bin/sh From: Jeffrey J. Kosowskybacku...@kosowsky.org Personally, I use 'sudo' -- as in: sudo -u backuppc Not sure though if sudo is a standard package with freebsd... su -m backuppc is sufficient in FreeBSD alpha# su -m backuppc alpha# id uid=300(backuppc) gid=300(backuppc) groups=300(backuppc) Also sudo is available from ports: security/sudo alpha# sudo -u backuppc id uid=300(backuppc) gid=300(backuppc) groups=300(backuppc) -- Alexander Moisseev -- What Every C/C++ and Fortran developer Should Know! Read this article and learn how Intel has extended the reach of its next-generation tools to help Windows* and Linux* C/C++ and Fortran developers boost performance applications - including clusters. http://p.sf.net/sfu/intel-dev2devmay ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
Holger Parplies wrote at about 23:03:57 +0200 on Tuesday, May 3, 2011: Hi, Les Mikesell wrote on 2011-05-03 15:14:08 -0500 [Re: [BackupPC-users] Not able to use the backuppc account in freebsd]: I'm surprised that sudo doesn't honor the user's shell. really? It's really not surprising. The semantics of sudo is allow executing /exact/path/to/some/command as user X to user Y, possibly without password, not allow executing something that /some/random/shell would do when you type $some_random_string at its prompt, so sudo would use an execve() system call, not a user's login shell. su can override it with a command line option, but the issue that prompted this thread is that the linux/bsd flavors of su take different options. As would be explained in the corresponding fine (tm) manual pages. I'm sure the manual pages of 'sudo' would likewise explain whether there are differences in its options on Linux vs. BSD (which, I'm guessing, there probably aren't, but that's just a guess). So, the generic answer to the original question is: RTFM, or, if that's too complicated, use a command with identical syntax. Regards, Holger P.S.: I fully agree in advance with any responses. FYI - You can get the behavior of using the /etc/passwd shell by using the -i or -s flags -- see the manpage. -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
On 5/3/11 2:42 AM, RYAN M. vAN GINNEKEN wrote: [c0mputerking@miako /usr/ports/shells/bash]# su -s /usr/local/bin/bash backuppc su: username too long Looks like the -s option doesn't work the same as in Linux. If there isn't another way to specify the shell to run, just give the backuppc user a shell in the /etc/passwd file. -- Les Mikesell lesmikes...@gmail.com -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
Running BackupPC on FreeBSD 8.1 doing some troubleshooting, but cannot seem to get this command to work. Also cannot seem to login as backuppc user no shell and all that, please help usr/local/bin/BackupPC_dump -v -f localhost /usr/local/bin/BackupPC_dump: Wrong user: my userid is 0, instead of 300 (backuppc) Please su backuppc first BackupPC::Lib-new failed Please su backuppc first su -l /bin/sh backuppc su: unknown login: /bin/sh This is telling you that you don't have a user named /bin/sh. Frankly, you probably don't, it's probably better to use the backuppc user. su - backuppc should be sufficient. [c0mputerking@miako /usr/ports/shells/bash]# su -l /usr/local/bin/bash backuppc su: username too long [c0mputerking@miako /usr/ports/shells/bash]# su -s /usr/local/bin/bash backuppc su: username too long Unsurprisingly, the username /use/local/bin/bash is too long, but you probably don't have a user named that anyway. -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
On 5/3/11 2:42 AM, RYAN M. vAN GINNEKEN wrote: [c0mputerking@miako /usr/ports/shells/bash]# su -s /usr/local/bin/bash backuppc su: username too long Looks like the -s option doesn't work the same as in Linux. If there isn't another way to specify the shell to run, just give the backuppc user a shell in the /etc/passwd file. -- Les Mikesell lesmikes...@gmail.com The FreeBSD equivalent would be su -m backuppc -c /bin/sh -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
RYAN M. vAN GINNEKEN wrote at about 01:42:42 -0600 on Tuesday, May 3, 2011: Running BackupPC on FreeBSD 8.1 doing some troubleshooting, but cannot seem to get this command to work. Also cannot seem to login as backuppc user no shell and all that, please help usr/local/bin/BackupPC_dump -v -f localhost /usr/local/bin/BackupPC_dump: Wrong user: my userid is 0, instead of 300 (backuppc) Please su backuppc first BackupPC::Lib-new failed Personally, I use 'sudo' -- as in: sudo -u backuppc Not sure though if sudo is a standard package with freebsd... -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
On 5/3/2011 12:11 PM, Jeffrey J. Kosowsky wrote: RYAN M. vAN GINNEKEN wrote at about 01:42:42 -0600 on Tuesday, May 3, 2011: Running BackupPC on FreeBSD 8.1 doing some troubleshooting, but cannot seem to get this command to work. Also cannot seem to login as backuppc user no shell and all that, please help usr/local/bin/BackupPC_dump -v -f localhost /usr/local/bin/BackupPC_dump: Wrong user: my userid is 0, instead of 300 (backuppc) Please su backuppc first BackupPC::Lib-new failed Personally, I use 'sudo' -- as in: sudo -u backuppc Not sure though if sudo is a standard package with freebsd... Even it it is, it should try to run the shell specified in the passwd file for the user. Apparently the way backuppc is installed it doesn't have a valid shell or a simple su would have worked. -- Les Mikesell lesmikes...@gmail.com -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
Les Mikesell wrote at about 12:26:04 -0500 on Tuesday, May 3, 2011: On 5/3/2011 12:11 PM, Jeffrey J. Kosowsky wrote: RYAN M. vAN GINNEKEN wrote at about 01:42:42 -0600 on Tuesday, May 3, 2011: Running BackupPC on FreeBSD 8.1 doing some troubleshooting, but cannot seem to get this command to work. Also cannot seem to login as backuppc user no shell and all that, please help usr/local/bin/BackupPC_dump -v -f localhost /usr/local/bin/BackupPC_dump: Wrong user: my userid is 0, instead of 300 (backuppc) Please su backuppc first BackupPC::Lib-new failed Personally, I use 'sudo' -- as in: sudo -u backuppc Not sure though if sudo is a standard package with freebsd... Even it it is, it should try to run the shell specified in the passwd file for the user. Apparently the way backuppc is installed it doesn't have a valid shell or a simple su would have worked. As (marginally) added security, I give my 'backuppc' /etc/passwd entry the shell '/sbin/nologin' -- which works with sudo but disallows simple 'su' login. So a real shell is not necessary... -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
Jeffrey J. Kosowsky backu...@kosowsky.org wrote on 05/03/2011 01:43:54 PM: As (marginally) added security, I give my 'backuppc' /etc/passwd entry the shell '/sbin/nologin' -- which works with sudo but disallows simple 'su' login. So a real shell is not necessary... This is also the default for the several BackupPC RPM's I've used in the past (which was a while ago, so YMMV). Timothy J. Massey Out of the Box Solutions, Inc. Creative IT Solutions Made Simple! http://www.OutOfTheBoxSolutions.com tmas...@obscorp.com 22108 Harper Ave. St. Clair Shores, MI 48080 Office: (800)750-4OBS (4627) Cell: (586)945-8796 -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
On 5/3/2011 2:50 PM, Timothy J Massey wrote: Jeffrey J. Kosowsky backu...@kosowsky.org wrote on 05/03/2011 01:43:54 PM: As (marginally) added security, I give my 'backuppc' /etc/passwd entry the shell '/sbin/nologin' -- which works with sudo but disallows simple 'su' login. So a real shell is not necessary... This is also the default for the several BackupPC RPM's I've used in the past (which was a while ago, so YMMV). I'm surprised that sudo doesn't honor the user's shell. su can override it with a command line option, but the issue that prompted this thread is that the linux/bsd flavors of su take different options. -- Les Mikesell lesmikes...@gmail.com -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
Hi, Les Mikesell wrote on 2011-05-03 15:14:08 -0500 [Re: [BackupPC-users] Not able to use the backuppc account in freebsd]: I'm surprised that sudo doesn't honor the user's shell. really? It's really not surprising. The semantics of sudo is allow executing /exact/path/to/some/command as user X to user Y, possibly without password, not allow executing something that /some/random/shell would do when you type $some_random_string at its prompt, so sudo would use an execve() system call, not a user's login shell. su can override it with a command line option, but the issue that prompted this thread is that the linux/bsd flavors of su take different options. As would be explained in the corresponding fine (tm) manual pages. I'm sure the manual pages of 'sudo' would likewise explain whether there are differences in its options on Linux vs. BSD (which, I'm guessing, there probably aren't, but that's just a guess). So, the generic answer to the original question is: RTFM, or, if that's too complicated, use a command with identical syntax. Regards, Holger P.S.: I fully agree in advance with any responses. -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/
Re: [BackupPC-users] Not able to use the backuppc account in freebsd
On 5/3/2011 4:03 PM, Holger Parplies wrote: Hi, Les Mikesell wrote on 2011-05-03 15:14:08 -0500 [Re: [BackupPC-users] Not able to use the backuppc account in freebsd]: I'm surprised that sudo doesn't honor the user's shell. really? It's really not surprising. The semantics of sudo is allow executing /exact/path/to/some/command as user X to user Y, possibly without password, not allow executingsomething that /some/random/shell would do when you type $some_random_string at its prompt, so sudo would use an execve() system call, not a user's login shell. It's surprising to me, because I'd expect it to execute a command as a user by doing the same thing as if the user executed the command - which is going to depend on the shell parsing it. That is, the same as su with the '-c command' option. It's not 'some random shell', it's the shell the user would use. But, you are right - it does something different. P.S.: I fully agree in advance with any responses. Heh... -- Les Mikesell lesmikes...@gmail.com -- WhatsUp Gold - Download Free Network Management Software The most intuitive, comprehensive, and cost-effective network management toolset available today. Delivers lowest initial acquisition cost and overall TCO of any competing solution. http://p.sf.net/sfu/whatsupgold-sd ___ BackupPC-users mailing list BackupPC-users@lists.sourceforge.net List:https://lists.sourceforge.net/lists/listinfo/backuppc-users Wiki:http://backuppc.wiki.sourceforge.net Project: http://backuppc.sourceforge.net/