...how to update system time permanently in solaris through c++.
...how can i login into superuser(su) account through c++ code in solaris.
narlapavan 0 Newbie Poster
Recommended Answers
Jump to Post— rubberman 1,355Short answers,
1. Same as you would in a C application.
2. Ditto - you can't.Long answers.
1. Why? Call system("ntpdate ntp_server_address") - this will set the system time to the global clock. Guaranteed accurate. If you want to set it to your own value, use …
Jump to Post— rubberman 1,355Well, you can enable the setuid bit on the date command (chmod +s /bin/date), then use the system("date time_val") to set the date+time in your C/C++ program.
All 5 Replies
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
narlapavan 0 Newbie Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
narlapavan 0 Newbie Poster
dpa.clt 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.