Author Topic: Adding users, and where's all the commands?  (Read 4166 times)

gdog

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Adding users, and where's all the commands?
« on: July 28, 2004, 07:34:23 pm »
Had to vi the /etc/passwd to create a new user, but there is no pwconv command, and so I can't get the shadow file to update  

Also, there's no useradd, usermod, or diff commands, and I'm sure I'm going to find others. No man pages either, which I can understand due to space constraints. Is there documentation anywhere on the command set that does exist on this little jewel?

Thanks,

gdog
You can tell a lot about a man by the condition of his shoes

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Adding users, and where's all the commands?
« Reply #1 on: July 28, 2004, 08:16:37 pm »
Most of the command on the Zaurus are from busybox, type busybox -v to see all commands that the version on your machine can do.

Other CLI linunx commands are in /sbin, /bin, /usr/sbin and /usr/bin. There are a numbe of packages available to add most of the usual commands.
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

gdog

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Adding users, and where's all the commands?
« Reply #2 on: July 28, 2004, 08:44:06 pm »
Hey thanks Stu. I'll take a look.

Regards,

gdog
You can tell a lot about a man by the condition of his shoes

tumnus

  • Hero Member
  • *****
  • Posts: 1176
    • View Profile
    • http://www.cpinkney.org.uk
Adding users, and where's all the commands?
« Reply #3 on: July 29, 2004, 03:16:05 am »
All the user stuff uses tinylogin in a similar way to busybox.

There is adduser and addgroup already. If you look around at various Zaurus software sites/feeds you'll probably find the missing commands. You can also use the Debian ARM feed.
# Search the Zaurus Howtos ## Search the Zaurus FAQs ## Find Z software at ELSI #
--------------------
UK SL5500 with Sharp ROM 3.13, SL5600 with Sharp ROM 1.32 - SuSE 9.0 Pro, Windows XP Home
Qualendar for Calendar and Todo
Socket Bluetooth CF Card (Rev F), Kingmax 512MB MMC Card, Palm Tungsten T Stylus,
Pretec CF->Smartmedia Adapter, Semsons Universal Battery Extender

gdog

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Adding users, and where's all the commands?
« Reply #4 on: July 29, 2004, 09:51:10 am »
Busybox seems to be missing from my Z. Not sure what you mean by "user stuff" tumnus, but I'd sure like to find the pwconv command somewhere. I've never used useradd or usermod, instead relying on good ole vi and pwconv to update the shadow. I have some bad habits I'm sure, but it's gettin kind of late in the game to change now  

I had no idea we could use the debian arm builds. Are there any limitations to that?

Thanks,

gdog
You can tell a lot about a man by the condition of his shoes

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Adding users, and where's all the commands?
« Reply #5 on: July 29, 2004, 11:19:11 am »
Quote
Busybox seems to be missing from my Z. Not sure what you mean by "user stuff" tumnus, but I'd sure like to find the pwconv command somewhere. I've never used useradd or usermod, instead relying on good ole vi and pwconv to update the shadow. I have some bad habits I'm sure, but it's gettin kind of late in the game to change now  

I had no idea we could use the debian arm builds. Are there any limitations to that?

Thanks,

gdog
What ROM are you using?

On my C760

Code: [Select]
$ which busybox
/bin/busybox

You can edit the shadow file with vi - leave the password blank and change it with passwd
Just copy the root entry and make sure there is nothing betwen the first 2 colons (directly after the username)

The only limitations on debian arm binaries I've found is that they must be compiled with gcc2.95 and need to CLI apps - although you can use X apps with X/Qt

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

gdog

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Adding users, and where's all the commands?
« Reply #6 on: July 29, 2004, 10:53:28 pm »
I found busybox Stu. No diff in there but there are some other useful commands. Cool concept.

I'll try taking the x out from between the two colons and see if the shadow file likes that. I did copy the root entry because I wanted the new account to have the gid and uid of zero. Tried the same thing with the zaurus account but that's a different story. As it is now I can't su to the new account because it complains the shadow file doesn't recognize it. It's crying for pwconv or usermod  

I'm going to spend the next free time that I have trying to get putty working on my PC and ssh going on the z. I am behind a firewall, but not a good or recent one. One of these days I hope to have the time to master ip tables, but that will have to wait I'm afraid.

Thanks for the tips Stu

gdog
« Last Edit: July 30, 2004, 12:09:10 am by gdog »
You can tell a lot about a man by the condition of his shoes

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Adding users, and where's all the commands?
« Reply #7 on: July 30, 2004, 05:49:16 am »
You want the x in /etc/passwd, you need the :: in /etc/shadow

/etc/passwd
Code: [Select]
stu:x:501:501:Stu:/home/stu:/bin/bash
/etc/passwd
Code: [Select]
stu::10933:0:99999:7:::then when you run passwd as stu it will write the password to /etc/shadow,  I've always added users this way - never liked them fandangled gui user tools

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

gdog

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Adding users, and where's all the commands?
« Reply #8 on: July 30, 2004, 11:32:54 am »
Quote
You want the x in /etc/passwd, you need the :: in /etc/shadow

/etc/passwd
Code: [Select]
stu:x:501:501:Stu:/home/stu:/bin/bash
/etc/passwd
Code: [Select]
stu::10933:0:99999:7:::then when you run passwd as stu it will write the password to /etc/shadow,  I've always added users this way - never liked them fandangled gui user tools

Stu
I take it you meant /etc/shadow in your second illustration Stu. It's been too many years and I have to admit I'd forgotten this trick. I removed the x from the passwd file last night, and that allowed me to change pw, and login, but it also allowed zaurus to su to my account without using a pw, which I surely don't want. I'll use the other method as soon as I have a free moment.

I with you on the fancy gui tools too ;o)

Thanks again,

gdog
You can tell a lot about a man by the condition of his shoes

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Adding users, and where's all the commands?
« Reply #9 on: July 31, 2004, 09:10:43 am »
Quote
I take it you meant /etc/shadow in your second illustration Stu. It's been too many years and I have to admit I'd forgotten this trick. I removed the x from the passwd file last night, and that allowed me to change pw, and login, but it also allowed zaurus to su to my account without using a pw, which I surely don't want. I'll use the other method as soon as I have a free moment.

I with you on the fancy gui tools too ;o)

Thanks again,

gdog
Doh, hate it when I do that - starting to lose brain cells too quickly. Yep should have been /etc/shadow in the second example.
Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card

gdog

  • Full Member
  • ***
  • Posts: 246
    • View Profile
Adding users, and where's all the commands?
« Reply #10 on: August 01, 2004, 10:33:31 pm »
Quote
Doh, hate it when I do that - starting to lose brain cells too quickly. Yep should have been /etc/shadow in the second example.
Stu
At least you have 'em to lose Stu. I can't remember if I ever did. Strange thing happened, but I can't recall the sequence of events that occurred. I was messing around trying to get ssh working and for some reason the zaurus account, and the one I had created for myself were both gone. I tried to ssh as zaurus and it said something to the effect, "I don't know you, you don't exist, goodbye". Luckily I had backed up the passwd file before I had even tried to create the new account so I was able to just restore that one. The strange thing is that I wasn't even messing with the passwd file during that session.

At least I've got ssh working. Cool stuff to be able to have my Z upstairs and work on it from my PC downstairs, and securely. The whole ssh problem, near as I can figure was something in the 3.7.1 package. As soon as I unstalled it and installed the 3.6.1 package everything came together.

Later,

gdog
You can tell a lot about a man by the condition of his shoes