Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
On Saturday, September 14, 2019 03:48:40 AM Joe wrote: > On Fri, 13 Sep 2019 21:20:18 -0500 > > John Hasler wrote: > > rhkramer writes: > > > When I used Windows, it was not multiuser. > > > > Which version? Win95 was MSDOS with a GUI stuck on with bubblegum. > > Windows 1, 2, 3, 95, 98 and Me didn't have file permissions. Every other > version had, though in the home versions it was generally hidden, and > they couldn't join domains. Following up on my earlier reply, the first Windows I used to any extent was 3(.1). I might have had an earlier version of Windows, and might have experimented with it, but not very much. Essentially, the last version of Windows I used was 95, although I've had some exposure to later versions by helping other people with problems. Oh, I guess I have a much more modern version of Windows on a used laptop I bought -- I think it might have even been upgraded to Windows 10. I keep it around because I need Windows to update the map in my Garming GPS -- I haven't done that in probably 5 years or longer and I need to do it.
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
Hello, On Fri, Sep 13, 2019 at 06:57:11AM -0500, Richard Owlett wrote: > I think what is needed is an essay comparing/contrasting the proper usage of > "sudo" versus "su" versus "su -". It should also include a discussion of the > change from "su" to "su -". A lot has already been written about the change of "su" program in Debian and it's difficult to see how writing one more page will help anyone. The information is there for anyone to find, if they know they need to look. I think that's the problem here: those stumbling over issues with changed "su" behaviour are already used to the old behaviour of "su", so when they type something like: $ su # some-admin-command and get back a message that "some-admin-command" can't be found, they do not immediately think, "what can be wrong with my usage of su?" Instead they think, "what can be wrong with my install of some-admin-command?" hence threads like these. They feel they are comfortable with their use of "su" because it's worked for them so many times before. It's the new "some-admin-command" that must be messed up. So in fact the problem is harder than education because it is actually re-education. Over time, the "new" behaviour of "su" (which is now consistent with the behaviour of "su" on most other Linux distributions) will implant itself as the only known behaviour for "su" users, so these problems should reduce. As for "su" vs "sudo", it is a debate that has raged amongst small factions for years and I don't see it as possible to objectively make recommendations as to which is best and when, as it is all personal preference. Whatever "recommendation" one would make, there are going to be plenty of people who will pop up to say that is an anti-recommendation. You could try to just describe their functionality in contrast to each other, but it's been done so many times already. Type "difference between su and sudo" in your favourite search engine and there are pages and pages of results. It is probably some sort of failure that a GUI application needs the user to do anything at all with "su" or "sudo" or anything at a shell prompt. Although I would never want to give up use of the shell prompt, it is a steep learning curve for the new user, who just wants to install and play a game. Cheers, Andy -- https://bitfolk.com/ -- No-nonsense VPS hosting
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
On Fri, 13 Sep 2019 21:20:18 -0500 John Hasler wrote: > rhkramer writes: > > When I used Windows, it was not multiuser. > > Which version? Win95 was MSDOS with a GUI stuck on with bubblegum. Windows 1, 2, 3, 95, 98 and Me didn't have file permissions. Every other version had, though in the home versions it was generally hidden, and they couldn't join domains. -- Joe
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
rhkramer writes: > When I used Windows, it was not multiuser. Which version? Win95 was MSDOS with a GUI stuck on with bubblegum. -- John Hasler jhas...@newsguy.com Elmwood, WI USA
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
On Friday, September 13, 2019 11:44:25 AM Lee wrote: > On 9/13/19, Richard Owlett wrote: > > When I used Windows I was not a aware of permission issues be they root, > > owner, or group. > > You didn't share that machine? I shared a desktop PC with a middle > schooler that I didn't want acting as an admin, so I created multiple > accounts with different privs. Even now that I'm the only user of the > PC I've still got an admin account + normal user account on the > windows PC. When I used Windows, it was not multiuser.
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
> Do you have any problem with my statement: >> Today Linux is being used by an individual who is the _only_ >> user of a standalone system (e.g. laptop). Permission issues >> are much more intuitive in the Unix world than for a single >> user/owner of a laptop. I do: "Linux" is many different things, and I think the above is wrong in all of the cases: - Android/Linux: yes there's typically a single human user, but AFAICT [my understanding of Android's design is quite limited] the user is not really represented by any particular Linux-level user-id (instead, every application seems to have its own user-id to try and make sure they can't step on each other's toes). - GNU/Linux on (typically headless) servers: many human users, and usually none of them have a corresponding Linux-level user-id, tho sometimes they do. - GNU/Linux laptop/desktop: most of the time only one human user active on it at a time, indeed. But the Debian desktop on which I'm writing this message is used by my wife, my daughter, and myself, each with our own Linux-level user-id. And most of the time, 2 of those users are logged in (tho, since there's only a single seat, only one of the two users's sessions is displayed and active at any given time; of course I sometimes have long-running computations or SSH into the machine while my wife sits in front of it, so sometimes both users are active at the same time). BTW, historically, Gnome has not been super-good at dealing with such multi-login situations (the main culprit being sharing access to USB/bluetooth devices, audio hardware, ...). In my experience, overall the tendency is for it to get better over time, but there are occasional regressions. Software developers who don't pay attention of the "multi-user" case invariably mess up the design really badly. Stefan
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
On 9/13/19, Richard Owlett wrote: > On 09/13/2019 03:30 AM, Paul Sutton wrote: >> [snip] >> >> I have it working now after using the su - thing, well it wasn't a copy >> / paste issue here but you do raise a good point there. >> >> Thanks to everyone for their help, would be good to figure out why >> things like this happen. If I put my average user hat on (as in those >> trying to switch from windows) most users would probably just give up >> and see Debian as too complex. >> > > I see an interleaving of problem sources. > > When I used Windows I was not a aware of permission issues be they root, > owner, or group. You didn't share that machine? I shared a desktop PC with a middle schooler that I didn't want acting as an admin, so I created multiple accounts with different privs. Even now that I'm the only user of the PC I've still got an admin account + normal user account on the windows PC. > There has been a recent change from using "su " to using "su - ". > I'm not yet sure if that is an actual syntax change or a change of > 'recommended usage'. My understanding is that it's a recent change in the su program. Debian 9: lee@izzy ~ $ echo $PATH /home/lee/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/sbin:/sbin lee@izzy ~ $ su Password: root@izzy /home/lee # echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin Debian 10 apparently doesn't change the path unless you do "su -" > I think what is needed is an essay comparing/contrasting the proper > usage of "sudo" versus "su" versus "su -". sudo you don't have to give out the root password allows fine-grain control of who can do what (that I haven't figured out. I just added my userid to the sudo group & said close enuf) Regards, Lee
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
On 09/13/2019 09:29 AM, John Hasler wrote: Richard Owlett writes: Unix was a response to the needs of a large data center with possibly thousands of users. No it wasn't. Unix was a response to Multics, which *was* aimed at systems with thousands of users. If you want to see a truly complex system of permissions and access controls look at Multics. It was aimed at universities and similar institutions that wanted to serve large numbers of users on interactive terminals. It competed with the likes of MTS and Plato and was going to solve all security problems (such as they were at the time). Data centers were something else again and used IBM hardware and software. They were mostly batch: IBM's multiuser software was atrocious but it's job control, scheduling, and accounting stuff was to marvel at. Unix was aimed at small multiuser interactive systems running on minicomputers. The VAX 11/780 soon became the standard Unix box. As to history, I'll stand corrected. Do you have any problem with my statement: Today Linux is being used by an individual who is the _only_ user of a standalone system (e.g. laptop). Permission issues are much more intuitive in the Unix world than for a single user/owner of a laptop. TIA
Re: When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
Richard Owlett writes: > Unix was a response to the needs of a large data center with possibly > thousands of users. No it wasn't. Unix was a response to Multics, which *was* aimed at systems with thousands of users. If you want to see a truly complex system of permissions and access controls look at Multics. It was aimed at universities and similar institutions that wanted to serve large numbers of users on interactive terminals. It competed with the likes of MTS and Plato and was going to solve all security problems (such as they were at the time). Data centers were something else again and used IBM hardware and software. They were mostly batch: IBM's multiuser software was atrocious but it's job control, scheduling, and accounting stuff was to marvel at. Unix was aimed at small multiuser interactive systems running on minicomputers. The VAX 11/780 soon became the standard Unix box. -- John Hasler jhas...@newsguy.com Elmwood, WI USA
Re: rocks n diamonds
On 2019-09-13, Greg Wooledge wrote: > > And certainly many more, but that's all I could find in a minute or so > with Google. The problem is, most of the relevant threads have unrelated > Subject headers, like "rocks n diamonds". Which is not the OP's fault -- > it's just the way it ends up working out. > Then again rocks n diamonds never had anything to do with anything, and only the purest of unlikely serendipities might lead the haplessly unaware Debian user of the new su to the OP's thread (around the time hell freezes over, I should think). If you wanted to choose for extraneousness, you could hardly do better than 'rocks n diamonds' as a subject header. But had the OP chosen "dpkg-reconfigure -- command not found as root," for instance, as his subject line, that unlikelihood might have been reduced by a certain margin, though I admit maybe not one significant enough to merit this little aside. -- Thug: This is a stickup! Now come on. Your money or your life. [long pause] Thug: [repeating] Look, bud, I said, 'Your money or your life.' Jack Benny: I'm thinking, I'm thinking!
Re: rocks n diamonds
On Fri, 13 Sep 2019 08:44:55 -0400 Greg Wooledge wrote: Hello Greg, >The problem is, most of the relevant threads have unrelated >Subject headers, like "rocks n diamonds". Which is not the OP's fault Good point, well made. -- Regards _ / ) "The blindingly obvious is / _)radnever immediately apparent" You're not so safe in the safety of your room Nasty - The Damned pgphplH6_vkzJ.pgp Description: OpenPGP digital signature
Re: rocks n diamonds
On Fri, Sep 13, 2019 at 09:45:41AM +0100, Brad Rogers wrote: > On Fri, 13 Sep 2019 09:30:46 +0100 > 'su' inherits the current environment ($PATH, etc.) > > 'su -' creates a new environment (based on user you're su-ing to [not > always root]) > > This is a change from previous behaviour (obviously). However, many > (all?) other distros do it that way, Debian just came late to that > particular party. > > There's bound to be info about it on the Debian wiki, https://wiki.debian.org/NewInBuster#Changes > and it has > certainly been discussed on this list in the past. Those discussions > may have taken place before you joined us here, IDK. Search for 'su vs > su -' using your preferred search engine, and you'll see lots of info. https://lists.debian.org/debian-user/2018/08/msg00487.html https://unix.stackexchange.com/questions/460478/debian-su-and-su-path-differences https://superuser.com/questions/1354131/debainbuster-su-not-working-properly-command-not-found https://metabubble.net/linux/how-to-really-restore-legacy-behavior-of-su-in-debian-buster/ And certainly many more, but that's all I could find in a minute or so with Google. The problem is, most of the relevant threads have unrelated Subject headers, like "rocks n diamonds". Which is not the OP's fault -- it's just the way it ends up working out.
When/how/why to use "sudo", "su" or "su -" -- was [Re: rocks n diamonds]
On 09/13/2019 03:30 AM, Paul Sutton wrote: [snip] I have it working now after using the su - thing, well it wasn't a copy / paste issue here but you do raise a good point there. Thanks to everyone for their help, would be good to figure out why things like this happen. If I put my average user hat on (as in those trying to switch from windows) most users would probably just give up and see Debian as too complex. I see an interleaving of problem sources. When I used Windows I was not a aware of permission issues be they root, owner, or group. There has been a recent change from using "su " to using "su - ". I'm not yet sure if that is an actual syntax change or a change of 'recommended usage'. The is also a more subtle issue. Linux arose out of the Unix world. Unix was a response to the needs of a large data center with possibly thousands of users. Today Linux is being used by an individual who is the _only_ user of a standalone system (e.g. laptop). Permission issues are much more intuitive in the Unix world than for a single user/owner of a laptop. I think what is needed is an essay comparing/contrasting the proper usage of "sudo" versus "su" versus "su -". It should also include a discussion of the change from "su" to "su -". Notice no mention of man pages. They are not the appropriate tool for this job. They are written by experts for experts. A useful image might be handing an ESL student a dictionary and expecting an idiomatic speaker of English to result. YMMV
Re: rocks n diamonds
On Fri, 13 Sep 2019 09:30:46 +0100 Paul Sutton wrote: Hello Paul, >Thanks to everyone for their help, would be good to figure out why >things like this happen. 'su' inherits the current environment ($PATH, etc.) 'su -' creates a new environment (based on user you're su-ing to [not always root]) This is a change from previous behaviour (obviously). However, many (all?) other distros do it that way, Debian just came late to that particular party. There's bound to be info about it on the Debian wiki, and it has certainly been discussed on this list in the past. Those discussions may have taken place before you joined us here, IDK. Search for 'su vs su -' using your preferred search engine, and you'll see lots of info. -- Regards _ / ) "The blindingly obvious is / _)radnever immediately apparent" When I say ugly, I don't mean rough looking, I mean hideous Ugly - The Stranglers pgpv1137LSCOm.pgp Description: OpenPGP digital signature
Re: rocks n diamonds
On 13/09/2019 09:25, Jonas Smedegaard wrote: > Quoting Paul Sutton (2019-09-13 09:27:58) >> Hi >> >> Just tried to run the rocksndiamonds games >> entering this at the command line gives. >> Run `dpkg-reconfigure rocksndiamonds' as root >> to install/update game levels. > > What is the output of this command?: > > apt list rocksndiamonds > > >> Once I have run su to get to root I try and run >> >> dpkg-reconfigure rocksndiamonds >> and get >> bash: dpkg-reconfigure: command not found >> >> can anyone suggest what is wrong please, > > Wild suggestion: Perhaps you copied the instruction from an interface > that kindly (but wrongly) had translated the ASCII hyphen-dash character > to another typographic variant. > > Try (if you didn't already) to type (directly key-by-key, no copying) > "dpkg-re" and then hit TAB, to let the shell tab-completion help. > > > - Jonas > I have it working now after using the su - thing, well it wasn't a copy / paste issue here but you do raise a good point there. Thanks to everyone for their help, would be good to figure out why things like this happen. If I put my average user hat on (as in those trying to switch from windows) most users would probably just give up and see Debian as too complex. Paul -- Paul Sutton http://www.zleap.net https://www.linkedin.com/in/zleap/ gnupg : 7D6D B682 F351 8D08 1893 1E16 F086 5537 D066 302D
Re: rocks n diamonds
Quoting Paul Sutton (2019-09-13 09:27:58) > Hi > > Just tried to run the rocksndiamonds games > entering this at the command line gives. > Run `dpkg-reconfigure rocksndiamonds' as root > to install/update game levels. What is the output of this command?: apt list rocksndiamonds > Once I have run su to get to root I try and run > > dpkg-reconfigure rocksndiamonds > and get > bash: dpkg-reconfigure: command not found > > can anyone suggest what is wrong please, Wild suggestion: Perhaps you copied the instruction from an interface that kindly (but wrongly) had translated the ASCII hyphen-dash character to another typographic variant. Try (if you didn't already) to type (directly key-by-key, no copying) "dpkg-re" and then hit TAB, to let the shell tab-completion help. - Jonas -- * Jonas Smedegaard - idealist & Internet-arkitekt * Tlf.: +45 40843136 Website: http://dr.jones.dk/ [x] quote me freely [ ] ask before reusing [ ] keep private signature.asc Description: signature
Re: rocks n diamonds
On 2019-09-13, Paul Sutton wrote: > > Once I have run su to get to root I try and run > > dpkg-reconfigure rocksndiamonds > and get > bash: dpkg-reconfigure: command not found > > can anyone suggest what is wrong please, I can only guess you've done a 'su' rather than 'su -' in becoming root. > cat /etc/debian_version > gives : 10.1 > > Thanks > > Paul -- Thug: This is a stickup! Now come on. Your money or your life. [long pause] Thug: [repeating] Look, bud, I said, 'Your money or your life.' Jack Benny: I'm thinking, I'm thinking!
Re: rocks n diamonds
On Fri, 13 Sep 2019 08:27:58 +0100 Paul Sutton wrote: Hello Paul, >can anyone suggest what is wrong please, Yes: you need to 'su -', not 'su' -- Regards _ / ) "The blindingly obvious is / _)radnever immediately apparent" Life goes quick and it goes without warning Bombsite Boy - The Adverts pgpR2DmNgFMKU.pgp Description: OpenPGP digital signature
Re: rocks n diamonds
On 13/09/2019 08:40, Alberto Luaces wrote: > Alberto Luaces writes: > >> Paul Sutton writes: >> >>> dpkg-reconfigure rocksndiamonds >> >> Can you add "sudo" or become root for that? I am running the above as su (root) I don't want to spend hours faffing around and struggling to set up sudo. > > Well, and also check the installation of the debconf package? > debconf Usage: debconf [options] command [args] so it appears that debconf is installed, this programme used to work, it has now stopped working. What is wrong with using su for getting root, sometimes I use su to carry out several tasks -- Paul Sutton http://www.zleap.net https://www.linkedin.com/in/zleap/ gnupg : 7D6D B682 F351 8D08 1893 1E16 F086 5537 D066 302D
Re: rocks n diamonds
Alberto Luaces writes: > Paul Sutton writes: > >> dpkg-reconfigure rocksndiamonds > > Can you add "sudo" or become root for that? Well, and also check the installation of the debconf package? -- Alberto
Re: rocks n diamonds
Paul Sutton writes: > dpkg-reconfigure rocksndiamonds Can you add "sudo" or become root for that? -- Alberto
rocks n diamonds
Hi Just tried to run the rocksndiamonds games entering this at the command line gives. Run `dpkg-reconfigure rocksndiamonds' as root to install/update game levels. Once I have run su to get to root I try and run dpkg-reconfigure rocksndiamonds and get bash: dpkg-reconfigure: command not found can anyone suggest what is wrong please, cat /etc/debian_version gives : 10.1 Thanks Paul -- Paul Sutton http://www.zleap.net https://www.linkedin.com/in/zleap/ gnupg : 7D6D B682 F351 8D08 1893 1E16 F086 5537 D066 302D